worsarise commited on
Commit
d114760
·
verified ·
1 Parent(s): 0179583

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +15 -0
main.py CHANGED
@@ -15,6 +15,21 @@ model = SentenceTransformer(MODEL_ID, device="cpu")
15
  def health_check():
16
  return {"status": "healthy"}
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  @app.post("/v1/embeddings")
19
  async def create_embeddings(request: Request):
20
  try:
 
15
  def health_check():
16
  return {"status": "healthy"}
17
 
18
+ @app.get("/v1/models")
19
+ def list_models():
20
+ # n8n hits this endpoint just to verify the connection is alive
21
+ return {
22
+ "object": "list",
23
+ "data": [
24
+ {
25
+ "id": MODEL_ID,
26
+ "object": "model",
27
+ "created": 1677610602,
28
+ "owned_by": "snowflake"
29
+ }
30
+ ]
31
+ }
32
+
33
  @app.post("/v1/embeddings")
34
  async def create_embeddings(request: Request):
35
  try: