mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 00:32:26 +00:00
minor fixes
This commit is contained in:
parent
6632d7e410
commit
c3865faf37
6 changed files with 19 additions and 9 deletions
|
|
@ -317,7 +317,7 @@ class Agents(Protocol):
|
|||
],
|
||||
stream: Optional[bool] = False,
|
||||
documents: Optional[List[Document]] = None,
|
||||
tools: Optional[List[AgentToolGroup]] = None,
|
||||
toolgroups: Optional[List[AgentToolGroup]] = None,
|
||||
) -> Union[Turn, AsyncIterator[AgentTurnResponseStreamChunk]]: ...
|
||||
|
||||
@webmethod(route="/agents/turn/get")
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class MetaReferenceAgentsImpl(Agents):
|
|||
ToolResponseMessage,
|
||||
]
|
||||
],
|
||||
tools: Optional[List[AgentToolGroup]] = None,
|
||||
toolgroups: Optional[List[AgentToolGroup]] = None,
|
||||
documents: Optional[List[Document]] = None,
|
||||
stream: Optional[bool] = False,
|
||||
) -> AsyncGenerator:
|
||||
|
|
@ -156,7 +156,7 @@ class MetaReferenceAgentsImpl(Agents):
|
|||
session_id=session_id,
|
||||
messages=messages,
|
||||
stream=True,
|
||||
tools=tools,
|
||||
toolgroups=toolgroups,
|
||||
documents=documents,
|
||||
)
|
||||
if stream:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import os
|
|||
from typing import Dict, List
|
||||
|
||||
import pytest
|
||||
from llama_models.llama3.api.datatypes import BuiltinTool
|
||||
|
||||
from llama_stack.apis.agents import (
|
||||
AgentConfig,
|
||||
|
|
@ -335,7 +336,7 @@ class TestAgents:
|
|||
assert isinstance(tool_execution, ToolExecutionStep)
|
||||
assert len(tool_execution.tool_calls) > 0
|
||||
actual_tool_name = tool_execution.tool_calls[0].tool_name
|
||||
assert actual_tool_name == "web_search"
|
||||
assert actual_tool_name == BuiltinTool.brave_search
|
||||
assert len(tool_execution.tool_responses) > 0
|
||||
|
||||
check_turn_complete_event(turn_response, session_id, search_query_messages)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue