-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agents to use tools api #673
base: main
Are you sure you want to change the base?
Conversation
@@ -500,6 +500,8 @@ async def register_tool_group( | |||
) | |||
provider_id = list(self.impls_by_provider_id.keys())[0] | |||
|
|||
# parse tool group to the type if dict | |||
tool_group = parse_obj_as(ToolGroupDef, tool_group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: parse_obj_as
is deprecated. TypeAdapter(ToolGroupDef).validate_python(...)
is the recommended replacement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
provider_id="brave-search", | ||
provider_type="inline::brave-search", | ||
config={ | ||
"api_key": os.environ["BRAVE_SEARCH_API_KEY"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be get_env_or_fail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no we skip the test if env is not present
@@ -55,7 +61,28 @@ def agents_meta_reference() -> ProviderFixture: | |||
) | |||
|
|||
|
|||
@pytest.fixture(scope="session") | |||
def tool_runtime_memory() -> ProviderFixture: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this fixture in tests/agents and not in tests/tool_runtime?
What does this PR do?
Agents to use tools API
Test Plan
pytest -s -v -k fireworks llama_stack/providers/tests/agents/test_agents.py
--safety-shield=meta-llama/Llama-Guard-3-8B
--inference-model=meta-llama/Llama-3.1-8B-Instruct