Skip to content

Fix and test validate_tools_and_managed_agents#731

Merged
albertvillanova merged 7 commits into
huggingface:mainfrom
albertvillanova:test-721
Feb 26, 2025
Merged

Fix and test validate_tools_and_managed_agents#731
albertvillanova merged 7 commits into
huggingface:mainfrom
albertvillanova:test-721

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Feb 20, 2025

Copy link
Copy Markdown
Member

Fix and test _validate_tools_and_managed_agents.

Revert PR:

Fix #795.

@albertvillanova

Copy link
Copy Markdown
Member Author

Comment thread tests/test_agents.py Outdated
Comment thread tests/test_agents.py Outdated
# Invalid case: tool name same as managed agent's tool name
([MockTool("tool1")], [MockAgent("agent1", [MockTool("tool1")])], pytest.raises(ValueError)),
# Invalid case: duplicate managed agent name and managed agent tool name
([], [MockAgent("tool1", [MockTool("tool1")])], pytest.raises(ValueError)),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above, I'm not sure that this should raise an error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@albertvillanova

Copy link
Copy Markdown
Member Author

You are right, @aymeric-roucher: those test should not raise error.

I have reverted:

and include the agent.name to be compared wit agent.tools and agent.managed_agents names, so that we fix issue:

This PR also fixes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants