From f2c1c20cc14ee7fb7b0df3b756e5b7f2bc67d21a Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 16 Apr 2024 20:53:02 -0700 Subject: [PATCH] fix - gemini function calling --- .../tests/test_amazing_vertex_completion.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/litellm/tests/test_amazing_vertex_completion.py b/litellm/tests/test_amazing_vertex_completion.py index f923339c09..44201db831 100644 --- a/litellm/tests/test_amazing_vertex_completion.py +++ b/litellm/tests/test_amazing_vertex_completion.py @@ -553,7 +553,12 @@ def test_gemini_pro_function_calling(): } ] - messages = [{"role": "user", "content": "What's the weather like in Boston today?"}] + messages = [ + { + "role": "user", + "content": "What's the weather like in Boston today in fahrenheit?", + } + ] completion = litellm.completion( model="gemini-pro", messages=messages, tools=tools, tool_choice="auto" ) @@ -586,7 +591,10 @@ def test_gemini_pro_function_calling(): } ] messages = [ - {"role": "user", "content": "What's the weather like in Boston today?"} + { + "role": "user", + "content": "What's the weather like in Boston today in fahrenheit?", + } ] completion = litellm.completion( model="gemini-pro", messages=messages, tools=tools, tool_choice="auto" @@ -629,7 +637,12 @@ def test_gemini_pro_function_calling_streaming(): }, } ] - messages = [{"role": "user", "content": "What's the weather like in Boston today?"}] + messages = [ + { + "role": "user", + "content": "What's the weather like in Boston today in fahrenheit?", + } + ] try: completion = litellm.completion( model="gemini-pro", @@ -675,7 +688,10 @@ async def test_gemini_pro_async_function_calling(): } ] messages = [ - {"role": "user", "content": "What's the weather like in Boston today?"} + { + "role": "user", + "content": "What's the weather like in Boston today in fahrenheit?", + } ] completion = await litellm.acompletion( model="gemini-pro", messages=messages, tools=tools, tool_choice="auto"