mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
map optional params
This commit is contained in:
parent
67110df3e1
commit
a4e24761a0
1 changed files with 16 additions and 1 deletions
|
@ -4551,6 +4551,21 @@ def get_optional_params(
|
||||||
optional_params["temperature"] = temperature
|
optional_params["temperature"] = temperature
|
||||||
if max_tokens is not None:
|
if max_tokens is not None:
|
||||||
optional_params["max_tokens"] = max_tokens
|
optional_params["max_tokens"] = max_tokens
|
||||||
|
elif "mistral" in model:
|
||||||
|
supported_params = ["max_tokens", "temperature", "stop", "top_p", "stream"]
|
||||||
|
_check_valid_arg(supported_params=supported_params)
|
||||||
|
# mistral params on bedrock
|
||||||
|
# \"max_tokens_to_sample\":300,\"temperature\":0.5,\"top_p\":1,\"stop_sequences\":[\"\\\\n\\\\nHuman:\"]}"
|
||||||
|
if max_tokens is not None:
|
||||||
|
optional_params["max_tokens"] = max_tokens
|
||||||
|
if temperature is not None:
|
||||||
|
optional_params["temperature"] = temperature
|
||||||
|
if top_p is not None:
|
||||||
|
optional_params["top_p"] = top_p
|
||||||
|
if stop is not None:
|
||||||
|
optional_params["stop"] = stop
|
||||||
|
if stream is not None:
|
||||||
|
optional_params["stream"] = stream
|
||||||
elif custom_llm_provider == "aleph_alpha":
|
elif custom_llm_provider == "aleph_alpha":
|
||||||
supported_params = [
|
supported_params = [
|
||||||
"max_tokens",
|
"max_tokens",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue