mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 22:19:49 +00:00
add support for built in tool type
This commit is contained in:
parent
517bc9ebea
commit
1a66ddc1b5
8 changed files with 83 additions and 75 deletions
|
|
@ -150,9 +150,7 @@ async def create_agent_turn_with_search_tool(
|
|||
assert isinstance(tool_execution, ToolExecutionStep)
|
||||
assert len(tool_execution.tool_calls) > 0
|
||||
actual_tool_name = tool_execution.tool_calls[0].tool_name
|
||||
if isinstance(actual_tool_name, BuiltinTool):
|
||||
actual_tool_name = actual_tool_name.value
|
||||
assert actual_tool_name == tool_name
|
||||
assert actual_tool_name.value == tool_name
|
||||
assert len(tool_execution.tool_responses) > 0
|
||||
|
||||
check_turn_complete_event(turn_response, session_id, search_query_messages)
|
||||
|
|
@ -305,20 +303,6 @@ class TestAgents:
|
|||
"brave_search",
|
||||
)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_agent_turn_with_tavily_search(
|
||||
self, agents_stack, search_query_messages, common_params
|
||||
):
|
||||
if "TAVILY_SEARCH_API_KEY" not in os.environ:
|
||||
pytest.skip("TAVILY_SEARCH_API_KEY not set, skipping test")
|
||||
|
||||
await create_agent_turn_with_search_tool(
|
||||
agents_stack,
|
||||
search_query_messages,
|
||||
common_params,
|
||||
"tavily_search",
|
||||
)
|
||||
|
||||
|
||||
def check_event_types(turn_response):
|
||||
event_types = [chunk.event.payload.event_type for chunk in turn_response]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue