forked from phoenix/litellm-mirror
(fix) use cloudflare optional params
This commit is contained in:
parent
c33c1d85bb
commit
535a547b66
1 changed files with 3 additions and 4 deletions
|
@ -3419,14 +3419,13 @@ def get_optional_params(
|
||||||
optional_params["n"] = n
|
optional_params["n"] = n
|
||||||
if stop is not None:
|
if stop is not None:
|
||||||
optional_params["stop_sequences"] = stop
|
optional_params["stop_sequences"] = stop
|
||||||
elif (
|
elif custom_llm_provider == "cloudflare":
|
||||||
custom_llm_provider == "cloudlfare"
|
# https://developers.cloudflare.com/workers-ai/models/text-generation/#input
|
||||||
): # https://developers.cloudflare.com/workers-ai/models/text-generation/#input
|
|
||||||
supported_params = ["max_tokens", "stream"]
|
supported_params = ["max_tokens", "stream"]
|
||||||
_check_valid_arg(supported_params=supported_params)
|
_check_valid_arg(supported_params=supported_params)
|
||||||
|
|
||||||
if max_tokens is not None:
|
if max_tokens is not None:
|
||||||
optional_params["max_tokens"] = temperature
|
optional_params["max_tokens"] = max_tokens
|
||||||
if stream is not None:
|
if stream is not None:
|
||||||
optional_params["stream"] = stream
|
optional_params["stream"] = stream
|
||||||
elif custom_llm_provider == "ollama":
|
elif custom_llm_provider == "ollama":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue