MCPcopy
hub / github.com/lm-sys/FastChat / api_get_embeddings

Function api_get_embeddings

fastchat/serve/multi_model_worker.py:118–124  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

116
117@app.post("/worker_get_embeddings")
118async def api_get_embeddings(request: Request):
119 params = await request.json()
120 await acquire_worker_semaphore()
121 worker = worker_map[params["model"]]
122 embedding = worker.get_embeddings(params)
123 background_tasks = create_background_tasks()
124 return JSONResponse(content=embedding, background=background_tasks)
125
126
127@app.post("/worker_get_status")

Callers

nothing calls this directly

Calls 3

acquire_worker_semaphoreFunction · 0.70
create_background_tasksFunction · 0.70
get_embeddingsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…