diff options
author | Lain Soykaf <lain@lain.com> | 2024-05-27 14:15:04 +0400 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2024-05-27 14:15:04 +0400 |
commit | ec3f3fef7798111641f08020d5fd7ae16e407b89 (patch) | |
tree | 642b77c27d7031b67061c6ff1e0f4c02372d4ba9 /supplemental | |
parent | 8b76f56050a609bf562053cb7201a9204901490e (diff) | |
download | pleroma-ec3f3fef7798111641f08020d5fd7ae16e407b89.tar.gz pleroma-ec3f3fef7798111641f08020d5fd7ae16e407b89.zip |
Fastembed Server: Add health check endpoint
Diffstat (limited to 'supplemental')
-rw-r--r-- | supplemental/search/fastembed-api/fastembed-server.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/supplemental/search/fastembed-api/fastembed-server.py b/supplemental/search/fastembed-api/fastembed-server.py index dd4a7a9c8..02da69db2 100644 --- 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 |