feat(2/n): agent return turn awaiting input for tool calls#1187
Merged
yanxi0830 merged 17 commits intoagents-unify-toolsfrom Feb 21, 2025
Merged
feat(2/n): agent return turn awaiting input for tool calls#1187yanxi0830 merged 17 commits intoagents-unify-toolsfrom
yanxi0830 merged 17 commits intoagents-unify-toolsfrom
Conversation
Contributor
You mean this is a backward incompatible change, right? |
ashwinb
requested changes
Feb 21, 2025
Contributor
Author
Actually, I was referring to backward compat in that this change won't impact anything if client wants to create a separate turn. But I agree that the |
ashwinb
approved these changes
Feb 21, 2025
# What does this PR do? - #1178 - #1187 - #1194 **client changes** - llamastack/llama-stack-client-python#157 - llamastack/llama-stack-client-python#158 ## Test Plan ``` LLAMA_STACK_BASE_URL=http://localhost:8321 pytest -v tests/client-sdk/agents/test_agents.py --inference-model meta-llama/Llama-3.1-8B-Instruct ``` ``` LLAMA_STACK_CONFIG=fireworks pytest -v tests/client-sdk/agents/test_agents.py --inference-model meta-llama/Llama-3.1-8B-Instruct ``` <img width="1080" alt="image" src="https://github.com/user-attachments/assets/6c48e062-5d00-4fed-98de-ecca627e5195" /> **llama-stack-apps** ``` python -m examples.agents.react_agent localhost 8321 ``` - Test with script: https://gist.github.com/yanxi0830/f2e407527f468998a700cd29fd271b15 **Output Before**: we have 2 `turn_id` with 2 turns - https://gist.github.com/yanxi0830/9fbd7a80fcddc784a28c59d4a9c1d943 **Output After**: we have 1 `turn_id`, the final turn have all 3 steps - https://gist.github.com/yanxi0830/17754d56d08ccbeaec419b693137500c <img width="622" alt="image" src="https://github.com/user-attachments/assets/ed7f42ca-41c8-4ee9-b6fa-2299901cafb4" /> **Telemetry** <img width="1389" alt="image" src="https://github.com/user-attachments/assets/031bf6ab-959c-46a7-aa85-70a511cba296" /> [//]: # (## Documentation)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a backward compat change. Default
allow_resume_turn=Falseto work with client v0.1.3.Expected Behaviour
agent.create_turn. When user receives a custom client_tool_call. The last chunk should beThere should be a
tool_executionstep.The agent will then send back & record
tool_executionstep finish on server. and continue with the execution.Test Plan