fix: code quality on ollama chat

This commit is contained in:
Ishaan Jaff 2025-05-12 16:47:55 -07:00
parent 2cc4a87861
commit 405b0c1ed7

View file

@ -1,4 +1,3 @@
import inspect
import json
import time
import uuid
@ -208,9 +207,9 @@ class OllamaChatConfig(OpenAIGPTConfig):
litellm.add_function_to_prompt = (
True # so that main.py adds the function call to the prompt
)
optional_params[
"functions_unsupported_model"
] = non_default_params.get("functions")
optional_params["functions_unsupported_model"] = (
non_default_params.get("functions")
)
non_default_params.pop("tool_choice", None) # causes ollama requests to hang
non_default_params.pop("functions", None) # causes ollama requests to hang
return optional_params