fix(main.py): support text completion routing

This commit is contained in:
Krrish Dholakia 2024-01-12 11:24:31 +05:30
parent cbdb8d68a3
commit 51110bfb62
2 changed files with 5 additions and 4 deletions

View file

@ -3066,7 +3066,9 @@ def image_generation(
async def ahealth_check(
model_params: dict,
mode: Optional[Literal["completion", "embedding", "image_generation"]] = None,
mode: Optional[
Literal["completion", "embedding", "image_generation", "chat"]
] = None,
prompt: Optional[str] = None,
input: Optional[List] = None,
default_timeout: float = 6000,
@ -3084,7 +3086,7 @@ async def ahealth_check(
raise Exception("model not set")
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
mode = mode or "completion" # default to completion calls
mode = mode or "chat" # default to chat completion calls
if custom_llm_provider == "azure":
api_key = (