mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
(feat) proxy /embedding check 1 deploy call
This commit is contained in:
parent
0c4190bec7
commit
bc6a97495e
1 changed files with 2 additions and 0 deletions
|
@ -925,6 +925,8 @@ async def embeddings(request: Request, user_api_key_dict: UserAPIKeyAuth = Depen
|
||||||
router_model_names = [m["model_name"] for m in llm_model_list] if llm_model_list is not None else []
|
router_model_names = [m["model_name"] for m in llm_model_list] if llm_model_list is not None else []
|
||||||
if llm_router is not None and data["model"] in router_model_names: # model in router model list
|
if llm_router is not None and data["model"] in router_model_names: # model in router model list
|
||||||
response = await llm_router.aembedding(**data)
|
response = await llm_router.aembedding(**data)
|
||||||
|
elif llm_router is not None and data["model"] in llm_router.deployment_names: # model in router deployments, calling a specific deployment on the router
|
||||||
|
response = await llm_router.aembedding(**data)
|
||||||
else:
|
else:
|
||||||
response = await litellm.aembedding(**data)
|
response = await litellm.aembedding(**data)
|
||||||
background_tasks.add_task(log_input_output, request, response) # background task for logging to OTEL
|
background_tasks.add_task(log_input_output, request, response) # background task for logging to OTEL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue