mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-19 18:58:41 +00:00
precommit
This commit is contained in:
parent
57b3d14895
commit
eba2eb2b0e
3 changed files with 24 additions and 16 deletions
|
|
@ -117,13 +117,13 @@ def test_mcp_invocation(llama_stack_client, text_model_id, mcp_server):
|
|||
assert final_response is not None
|
||||
|
||||
issued_calls = [
|
||||
event
|
||||
for event in events
|
||||
if isinstance(event, StepProgress) and isinstance(event.delta, ToolCallIssuedDelta)
|
||||
event for event in events if isinstance(event, StepProgress) and isinstance(event.delta, ToolCallIssuedDelta)
|
||||
]
|
||||
assert issued_calls and issued_calls[0].delta.tool_name == "greet_everyone"
|
||||
|
||||
tool_events = [event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"]
|
||||
tool_events = [
|
||||
event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"
|
||||
]
|
||||
assert tool_events and tool_events[0].result.tool_calls[0].tool_name == "greet_everyone"
|
||||
|
||||
assert "hello" in final_response.output_text.lower()
|
||||
|
|
|
|||
|
|
@ -416,7 +416,9 @@ class TestAgentWithMCPTools:
|
|||
)
|
||||
|
||||
events = [chunk.event for chunk in chunks]
|
||||
tool_execution_steps = [event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"]
|
||||
tool_execution_steps = [
|
||||
event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"
|
||||
]
|
||||
|
||||
for step in tool_execution_steps:
|
||||
for tool_response in step.result.tool_responses:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue