Skip to content

Conversation

@albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Feb 20, 2025

Fix and test _validate_tools_and_managed_agents.

Revert PR:

Fix #795.

@albertvillanova
Copy link
Member Author

# 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
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
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
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:

@albertvillanova albertvillanova changed the title Test validate_tools_and_managed_agents Fix and test validate_tools_and_managed_agents Feb 26, 2025
@albertvillanova albertvillanova merged commit 9498094 into huggingface:main Feb 26, 2025
3 checks passed
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