fix - gemini function calling

This commit is contained in:
Ishaan Jaff
2024-04-16 20:54:22 -07:00
parent e20577d80c
commit 6498bbbd09
@@ -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"