commit: ec3f3fef7798111641f08020d5fd7ae16e407b89
parent 8b76f56050a609bf562053cb7201a9204901490e
Author: Lain Soykaf <lain@lain.com>
Date: Mon, 27 May 2024 14:15:04 +0400
Fastembed Server: Add health check endpoint
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/supplemental/search/fastembed-api/fastembed-server.py b/supplemental/search/fastembed-api/fastembed-server.py
@@ -17,6 +17,10 @@ def embeddings(request: EmbeddingRequest):
embeddings = next(model.embed(request.input)).tolist()
return {"data": [{"embedding": embeddings}]}
+@app.get("/health")
+def health():
+ return {"status": "ok"}
+
if __name__ == "__main__":
import uvicorn