The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: code quality on ollama chat
Ishaan Jaff405b0c1ed793
diff --git a/litellm/llms/ollama_chat.py b/litellm/llms/ollama_chat.pyindex 64fcf6dd3e8..22438eca082 100644--- a/litellm/llms/ollama_chat.py+++ b/litellm/llms/ollama_chat.py@@ -1,4 +1,3 @@-import inspectimport jsonimport timeimport 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 hangnon_default_params.pop("functions", None) # causes ollama requests to hangreturn optional_params