mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
test(test_function_calling.py): handle for when model returns a text response
This commit is contained in:
parent
caa46ca905
commit
10d65f0676
1 changed files with 41 additions and 38 deletions
|
@ -266,9 +266,12 @@ def test_groq_parallel_function_call():
|
|||
)
|
||||
print("Response\n", response)
|
||||
response_message = response.choices[0].message
|
||||
if hasattr(response_message, "tool_calls"):
|
||||
tool_calls = response_message.tool_calls
|
||||
|
||||
assert isinstance(response.choices[0].message.tool_calls[0].function.name, str)
|
||||
assert isinstance(
|
||||
response.choices[0].message.tool_calls[0].function.name, str
|
||||
)
|
||||
assert isinstance(
|
||||
response.choices[0].message.tool_calls[0].function.arguments, str
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue