Skip to content
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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

agents to use tools api #673

wants to merge 13 commits into from

Conversation

dineshyv
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 20, 2024
@@ -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)
Copy link
Contributor

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.

Copy link
Contributor Author

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"],
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants