-
Notifications
You must be signed in to change notification settings - Fork 199
feat: OpenRouterChatGenerator add integration tests for mixing Tool/Toolset
#2421
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
Conversation
OpenRouterChatGenerator add integration tests for mixing Tool/Toolset
| component = OpenRouterChatGenerator(tools=toolset) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vblagoje In the issue it says we are allowed to pass tool and toolsets in the same list.
| # Pass both tools at runtime - runtime tools should take precedence | ||
| messages = [ChatMessage.from_user("What's the time in Tokyo?")] | ||
| results = component.run(messages, tools=[time_tool]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says pass both tools, although only one tool is passed to run method.
|
|
||
| # Pass echo_tool as a list at runtime - runtime tools should take precedence | ||
| messages = [ChatMessage.from_user("Echo this: Hello World")] | ||
| results = component.run(messages, tools=[echo_tool]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vblagoje we need to update this to test passing mixed list of tools and toolsets instead of overriding init tools.
|
|
||
| # Pass echo_tool as a list at runtime - runtime tools should take precedence | ||
| messages = [ChatMessage.from_user("Echo this: Hello World")] | ||
| results = await component.run_async(messages, tools=[echo_tool]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vblagoje please update this as well like the above test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Amnah199 - done
Why:
Add integration tests for
ToolsTypeHaystack 2.19 updatespart of:
What:
How did you test it: