Skip to content

Conversation

ehhuang
Copy link
Contributor

@ehhuang ehhuang commented Mar 11, 2025

Summary:
closes #1488

Test Plan:
added new integration test

LLAMA_STACK_CONFIG=dev pytest -s -v tests/integration/agents/test_agents.py --safety-shield meta-llama/Llama-Guard-3-8B --text-model openai/gpt-4o-mini

Stack created with Sapling. Best reviewed with ReviewStack.

ehhuang added a commit to llamastack/llama-stack-client-python that referenced this pull request Mar 13, 2025
payload=AgentTurnResponseStepStartPayload(
step_type=StepType.tool_execution.value,
step_id=step_id,
input_messages = input_messages + [message]
Copy link
Contributor

Choose a reason for hiding this comment

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

all of this code inline in this method is becoming quite hard to scan through. I think we need another file where we write some simple functions (all of these inside the agent_instance object is also a FAIL mode that I had long before initiated ever since our first agent impl lol)

},
) as span:
tool_execution_start_time = datetime.now().astimezone().isoformat()
tool_result = await self.execute_tool_call_maybe(
Copy link
Contributor

Choose a reason for hiding this comment

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

can this fail or throw?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, maybe we can have a catch all and return some generic error message.

@ashwinb
Copy link
Contributor

ashwinb commented Mar 14, 2025

Overall, I feel like there are quite a few changes to the code here and substantial ones. If we are convinced all the changed code paths are exercised by our integration tests then that's OK otherwise adding either an integration test or some kind of smaller scoped unit tests would be advisable.

ehhuang added 2 commits March 17, 2025 16:17
Summary:

Test Plan:
Summary:

Test Plan:
Summary:

Test Plan:
Summary:

Test Plan:
Summary:

Test Plan:
@ehhuang ehhuang changed the base branch from main to pr1550 March 17, 2025 23:44
ehhuang added a commit that referenced this pull request Mar 18, 2025
# Summary:
Includes fixes to get test_agents working with openAI model, e.g. tool
parsing and message conversion

# Test Plan:
```
LLAMA_STACK_CONFIG=dev pytest -s -v tests/integration/agents/test_agents.py --safety-shield meta-llama/Llama-Guard-3-8B --text-model openai/gpt-4o-mini
```

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/meta-llama/llama-stack/pull/1550).
* #1556
* __->__ #1550
Base automatically changed from pr1550 to main March 18, 2025 05:11
@ehhuang ehhuang merged commit 37f155e into main Mar 18, 2025
13 checks passed
@ehhuang ehhuang deleted the pr1556 branch March 18, 2025 05:13
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.

feat(agent): support multiple tool calls

3 participants