mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-13 12:31:13 +00:00
Fastembed Server: Add health check endpoint
This commit is contained in:
parent
8b76f56050
commit
ec3f3fef77
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue