mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
test: update test
This commit is contained in:
parent
09a7ff5668
commit
416bdbdd99
1 changed files with 10 additions and 1 deletions
|
|
@ -327,12 +327,21 @@ def test_convert_to_model_response_object_json_mode():
|
|||
This test is verifying that when convert_tool_call_to_json_mode is True, a single tool call's arguments are correctly converted into the message content of the response.
|
||||
"""
|
||||
model_response_object = ModelResponse(model="gpt-3.5-turbo")
|
||||
from litellm.constants import RESPONSE_FORMAT_TOOL_NAME
|
||||
|
||||
response_object = {
|
||||
"choices": [
|
||||
{
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"tool_calls": [{"function": {"arguments": '{"key": "value"}'}}],
|
||||
"tool_calls": [
|
||||
{
|
||||
"function": {
|
||||
"arguments": '{"key": "value"}',
|
||||
"name": RESPONSE_FORMAT_TOOL_NAME,
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"finish_reason": None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue