Skip to content
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

Add Tool.from_component for components with str/native python types as input #8630

Open
julian-risch opened this issue Dec 12, 2024 · 0 comments · May be fixed by deepset-ai/haystack-experimental#159
Assignees
Labels
P1 High priority, add to the next sprint topic:agent
Milestone

Comments

@julian-risch
Copy link
Member

Is your feature request related to a problem? Please describe.
We got the feedback that Tool.from_component at least for components that can be easily used by ToolInvoker would be good to support for several reasons. Components are easily configurable in a YAML pipeline definition, which is an advantage over functions and thus over Tool.from_function. We also have custom components as a concept already.

Describe the solution you'd like
We want to keep the abstraction as lightweight as possible. Therefore, for this issue, let's support only components that have str/native python type input. Tool.from_component should check if the function run signature has str/native python type inputs and raise an error otherwise.
We should check if we can re-use the already implemented Tool.from_function internally for Tool.from_component.

Describe alternatives you've considered

Additional context
There are draft PRs related to Tool.from_component functionality:

@julian-risch julian-risch added topic:agent P1 High priority, add to the next sprint labels Dec 12, 2024
@julian-risch julian-risch added this to the 2.9.0 milestone Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority, add to the next sprint topic:agent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants