fix(main.py): automatically infer mode for text completion models

This commit is contained in:
Krrish Dholakia 2024-04-12 14:16:21 -07:00
parent b0770cf8e2
commit 74aa230eac
3 changed files with 11 additions and 5 deletions

View file

@ -3784,6 +3784,9 @@ async def ahealth_check(
api_base = model_params.get("api_base") or get_secret("OPENAI_API_BASE")
if custom_llm_provider == "text-completion-openai":
mode = "completion"
response = await openai_chat_completions.ahealth_check(
model=model,
messages=model_params.get(