forked from phoenix/litellm-mirror
fix(utils.py): fix ollama stop sequence mapping
This commit is contained in:
parent
66913222a1
commit
655fcd4d79
1 changed files with 2 additions and 2 deletions
|
@ -4358,7 +4358,7 @@ def get_optional_params(
|
||||||
if frequency_penalty is not None:
|
if frequency_penalty is not None:
|
||||||
optional_params["repeat_penalty"] = frequency_penalty
|
optional_params["repeat_penalty"] = frequency_penalty
|
||||||
if stop is not None:
|
if stop is not None:
|
||||||
optional_params["stop_sequences"] = stop
|
optional_params["stop"] = stop
|
||||||
elif custom_llm_provider == "ollama_chat":
|
elif custom_llm_provider == "ollama_chat":
|
||||||
supported_params = [
|
supported_params = [
|
||||||
"max_tokens",
|
"max_tokens",
|
||||||
|
@ -4381,7 +4381,7 @@ def get_optional_params(
|
||||||
if frequency_penalty is not None:
|
if frequency_penalty is not None:
|
||||||
optional_params["repeat_penalty"] = frequency_penalty
|
optional_params["repeat_penalty"] = frequency_penalty
|
||||||
if stop is not None:
|
if stop is not None:
|
||||||
optional_params["stop_sequences"] = stop
|
optional_params["stop"] = stop
|
||||||
elif custom_llm_provider == "nlp_cloud":
|
elif custom_llm_provider == "nlp_cloud":
|
||||||
supported_params = [
|
supported_params = [
|
||||||
"max_tokens",
|
"max_tokens",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue