summaryrefslogtreecommitdiff
path: root/supplemental/search
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2024-05-27 14:15:04 +0400
committerLain Soykaf <lain@lain.com>2024-05-27 14:15:04 +0400
commitec3f3fef7798111641f08020d5fd7ae16e407b89 (patch)
tree642b77c27d7031b67061c6ff1e0f4c02372d4ba9 /supplemental/search
parent8b76f56050a609bf562053cb7201a9204901490e (diff)
downloadpleroma-ec3f3fef7798111641f08020d5fd7ae16e407b89.tar.gz
pleroma-ec3f3fef7798111641f08020d5fd7ae16e407b89.zip
Fastembed Server: Add health check endpoint
Diffstat (limited to 'supplemental/search')
-rw-r--r--supplemental/search/fastembed-api/fastembed-server.py4
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