You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 overTool.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 forTool.from_component
.Describe alternatives you've considered
Additional context
There are draft PRs related to
Tool.from_component
functionality:Tool.from_openapi_spec
feat: Tool openapi integration haystack-experimental#151Tool.from_pipeline
feat: Use Haystack pipelines as tools viaTool.from_pipeline
haystack-experimental#133The text was updated successfully, but these errors were encountered: