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 45 commits into
base: main
Choose a base branch
from
Open

agents to use tools api #673

wants to merge 45 commits into from

Conversation

dineshyv
Copy link
Contributor

@dineshyv dineshyv commented Dec 20, 2024

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

pytest -s -v -k together  llama_stack/providers/tests/tools/test_tools.py \
   --safety-shield=meta-llama/Llama-Guard-3-8B \
   --inference-model=meta-llama/Llama-3.1-8B-Instruct

LLAMA_STACK_CONFIG="/Users/dineshyv/.llama/distributions/llamastack-together/together-run.yaml" pytest -v tests/client-sdk/agents/test_agents.py

run.yaml: https://gist.github.com/dineshyv/0365845ad325e1c2cab755788ccc5994

Notebook: https://colab.research.google.com/drive/1ck7hXQxRl6UvT-ijNRZ-gMZxH1G3cN2d?usp=sharing

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 20, 2024
@dineshyv dineshyv force-pushed the agents-with-tools-api branch 4 times, most recently from 3e25f7b to 01b4319 Compare January 3, 2025 22:14
@dineshyv dineshyv force-pushed the agents-with-tools-api branch from bd5786d to 6e78f55 Compare January 6, 2025 19:41
@dineshyv dineshyv force-pushed the agents-with-tools-api branch from 452147f to c3b3cee Compare January 6, 2025 21:11
@@ -659,6 +689,123 @@ async def _run(

n_iter += 1

async def _get_tool_defs(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe have a unit test just for this behavior, seems very key

content_items.append(d)

# Save the contents to a tempdir and use its path as a URL if code interpreter is present
if code_interpreter_tool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to make sure the code interpreter tool has a filesystem API -- at least something minimal so we can pass auxilliary "content" to a remote provider for code execution

@dineshyv dineshyv requested a review from sixianyi0721 as a code owner January 8, 2025 05:34
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.

5 participants