mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(responses): assert the streamed response.completed event echoes the named tool_choice
This commit is contained in:
parent
f5a410585a
commit
7563d94e65
1 changed files with 5 additions and 2 deletions
|
|
@ -679,6 +679,9 @@ def test_streamed_named_tool_choice_is_echoed_in_responses_api_shape() -> None:
|
|||
"response.in_progress",
|
||||
"response.completed",
|
||||
]
|
||||
assert response_events[0].response.tool_choice == {"type": "function", "name": "run_command"}
|
||||
assert response_events[1].response.tool_choice == {"type": "function", "name": "run_command"}
|
||||
assert [event.response.tool_choice for event in response_events] == [
|
||||
{"type": "function", "name": "run_command"},
|
||||
{"type": "function", "name": "run_command"},
|
||||
{"type": "function", "name": "run_command"},
|
||||
]
|
||||
assert any(getattr(event, "type", None) == "response.output_item.done" for event in events)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue