Replies: 7 comments 3 replies
-
Very much appreciate this abstraction! Makes working with, and especially debugging, tool calls a lot more transparent. I need to use Azure OpenAI, but managed to port #57 over (see my comment to #57 if you'd like me to contribute it back?) |
Beta Was this translation helpful? Give feedback.
-
@cjayb Thanks for the appreciation! Currently, this feature is experimental and we want to support it in 3 Chat Generators: OpenAI, Antrophic, and Ollama. If the experiment is successful, starting in November, we will implement it for other Generators as well and I can ping you to contribute. |
Beta Was this translation helpful? Give feedback.
-
During the live, a community member mentioned that he would like to use the |
Beta Was this translation helpful? Give feedback.
-
π§βπ³ New recipe: Newsletter Sending Agent with Experimental Haystack Tools |
Beta Was this translation helpful? Give feedback.
-
We also added support for Tools in Ollama, Anthropic and Hugging Face API Chat Generators! |
Beta Was this translation helpful? Give feedback.
-
Idea: Output of Tool Invoker matches input of ChatGenerator The proper workflow when using tools requires 2 generations: For this to properly work, I have two options Since (b) is preferred: Alternatively, a new component called OpenAIAgent, which for Step (2) automatically processes the output of the tool invoker in its current type, and then also turns it into the appropriate chat message list based on the chat messages it was provided with for first generation P.S. Maybe routing could even be performed by the Generator, since this follows a fixed syntax (either for ChatGeneraotr or OpenAIAgent :) ) |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
This is the discussion board for a group of experimental components and dataclasses to improve the support for Tool calling in Haystack.
What is Tool calling/function calling?
A growing number of Language Models now support passing tool definitions alongside the prompt.
Tools can be functions or APIs.
When appropriate, the model can generate a call to the tool in order to address the userβs query, although the model itself does not execute the tool.
The features outlined below are built to support tools in Haystack in a unified way, covering the entire process from tool call preparation to proper invocation and potential post-processing.
Experimental features:
ChatMessage
dataclass to be more flexible and future-proof.Tool
dataclass: a simple and unified abstraction to represent Tools throughout the framework.OpenAIChatGenerator
, with support for tools.ToolInvoker
component, to actually execute tool calls prepared by Language Models.π§ We are working on adding support for more Chat Generators and developing easier ways to convert functions into tools...
π§βπ³ Try the Cookbook here. Contains a step by step guide to the new features and shows several end-to-end examples.
π§βπ³ New recipe: Newsletter Sending Agent
Let us know how you get along with these components, and please do let us know if you have any feedback.
Beta Was this translation helpful? Give feedback.
All reactions