Fastembed Server: Add health check endpoint
This commit is contained in:
parent
8b76f56050
commit
ec3f3fef77
@ -17,6 +17,10 @@ def embeddings(request: EmbeddingRequest):
|
|||||||
embeddings = next(model.embed(request.input)).tolist()
|
embeddings = next(model.embed(request.input)).tolist()
|
||||||
return {"data": [{"embedding": embeddings}]}
|
return {"data": [{"embedding": embeddings}]}
|
||||||
|
|
||||||
|
@app.get("/health")
|
||||||
|
def health():
|
||||||
|
return {"status": "ok"}
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user