test_completion_cohere_command_r_plus_function_call

This commit is contained in:
Ishaan Jaffer
2025-10-16 20:33:41 -07:00
parent 64876634ef
commit 39b0e76a33
-24
View File
@@ -107,30 +107,6 @@ def test_completion_cohere_command_r_plus_function_call():
assert isinstance(
response.choices[0].message.tool_calls[0].function.arguments, str
)
messages.append(
response.choices[0].message.model_dump()
) # Add assistant tool invokes
tool_result = (
'{"location": "Boston", "temperature": "72", "unit": "fahrenheit"}'
)
# Add user submitted tool results in the OpenAI format
messages.append(
{
"tool_call_id": response.choices[0].message.tool_calls[0].id,
"role": "tool",
"name": response.choices[0].message.tool_calls[0].function.name,
"content": tool_result,
}
)
# In the second response, Cohere should deduce answer from tool results
second_response = completion(
model="command-r-plus",
messages=messages,
tools=tools,
tool_choice="auto",
force_single_step=True,
)
print(second_response)
except litellm.Timeout:
pass