From 405b0c1ed793c49ef35e14f3a3ad85b8a18e4816 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 12 May 2025 16:47:55 -0700 Subject: [PATCH] fix: code quality on ollama chat --- litellm/llms/ollama_chat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/litellm/llms/ollama_chat.py b/litellm/llms/ollama_chat.py index 64fcf6dd3e8..22438eca082 100644 --- a/litellm/llms/ollama_chat.py +++ b/litellm/llms/ollama_chat.py @@ -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