forked from phoenix/litellm-mirror
fix(utils.py): add extra body params for text completion calls
This commit is contained in:
parent
12f4fb3a42
commit
fdb7101aaf
3 changed files with 45 additions and 4 deletions
|
@ -3265,7 +3265,11 @@ def get_optional_params(
|
|||
optional_params["top_logprobs"] = top_logprobs
|
||||
if extra_headers is not None:
|
||||
optional_params["extra_headers"] = extra_headers
|
||||
if custom_llm_provider in ["openai", "azure"] + litellm.openai_compatible_providers:
|
||||
if (
|
||||
custom_llm_provider
|
||||
in ["openai", "azure", "text-completion-openai"]
|
||||
+ litellm.openai_compatible_providers
|
||||
):
|
||||
# for openai, azure we should pass the extra/passed params within `extra_body` https://github.com/openai/openai-python/blob/ac33853ba10d13ac149b1fa3ca6dba7d613065c9/src/openai/resources/models.py#L46
|
||||
extra_body = passed_params.pop("extra_body", {})
|
||||
for k in passed_params.keys():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue