mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
feat(ollama): set 'think' to False when reasoning effort is not high/medium/low (#15763)
This commit is contained in:
parent
2a1dbb5b9e
commit
1fcadd6c05
2 changed files with 2 additions and 2 deletions
|
|
@ -188,7 +188,7 @@ class OllamaChatConfig(BaseConfig):
|
|||
if model.startswith("gpt-oss"):
|
||||
optional_params["think"] = value
|
||||
else:
|
||||
optional_params["think"] = True
|
||||
optional_params["think"] = value in {"low", "medium", "high"}
|
||||
### FUNCTION CALLING LOGIC ###
|
||||
if param == "tools":
|
||||
## CHECK IF MODEL SUPPORTS TOOL CALLING ##
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class OllamaConfig(BaseConfig):
|
|||
if model.startswith("gpt-oss"):
|
||||
optional_params["think"] = value
|
||||
else:
|
||||
optional_params["think"] = True
|
||||
optional_params["think"] = value in {"low", "medium", "high"}
|
||||
elif param == "response_format" and isinstance(value, dict):
|
||||
if value["type"] == "json_object":
|
||||
optional_params["format"] = "json"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue