From 423a60c8bcfc1e7b4fd81ccbcba7757e772b85d8 Mon Sep 17 00:00:00 2001 From: corrm Date: Mon, 24 Jun 2024 05:55:22 +0300 Subject: [PATCH] chore: Improved OllamaConfig get_required_params and ollama_acompletion and ollama_async_streaming functions --- litellm/llms/ollama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/ollama.py b/litellm/llms/ollama.py index e7dd1d5f554..1939715b35c 100644 --- a/litellm/llms/ollama.py +++ b/litellm/llms/ollama.py @@ -126,7 +126,7 @@ class OllamaConfig: ) and v is not None } - + def get_required_params(self) -> List[ProviderField]: """For a given provider, return it's required fields with a description""" return [ @@ -451,7 +451,7 @@ async def ollama_acompletion(url, data, model_response, encoding, logging_obj): { "id": f"call_{str(uuid.uuid4())}", "function": { - "name": function_call["name"], + "name": function_call.get("name", function_call.get("function", None)), "arguments": json.dumps(function_call["arguments"]), }, "type": "function",