Fastembed Server: Add health check endpoint

This commit is contained in:
Lain Soykaf 2024-05-27 14:15:04 +04:00
parent 8b76f56050
commit ec3f3fef77

View file

@ -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