fix(test_completion.py): fix predibase test to be mock + fix optional param mapping for predibase

This commit is contained in:
Krrish Dholakia 2024-06-04 20:06:23 -07:00
parent 15b226ca4f
commit 1a95660495
2 changed files with 49 additions and 15 deletions

View file

@ -5457,7 +5457,7 @@ def get_optional_params(
optional_params["top_p"] = top_p
if stop is not None:
optional_params["stop_sequences"] = stop
elif custom_llm_provider == "huggingface":
elif custom_llm_provider == "huggingface" or custom_llm_provider == "predibase":
## check if unsupported param passed in
supported_params = get_supported_openai_params(
model=model, custom_llm_provider=custom_llm_provider
@ -5912,7 +5912,6 @@ def get_optional_params(
optional_params["logprobs"] = logprobs
if top_logprobs is not None:
optional_params["top_logprobs"] = top_logprobs
elif custom_llm_provider == "openrouter":
supported_params = get_supported_openai_params(
model=model, custom_llm_provider=custom_llm_provider