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
After a successful function call, LangchainProcessor correctly returns a function call message.
However, the LLM (e.g. OpenAI or Anthropic) requires to receive a so-called tool message response as acknowledgment that the function call is performed.
As the context contains the tools (as initialized with context = OpenAILLMContext(messages, tools),
I think (but not sure) that the acknowledgment is handled for OpenAI in pipecat/src/pipecat/services
/openai.py in this section for handling the context because ):
There is no equivalent of this code section in LangchainProcessor but crucial, as most people use langchain for agents that use tools, or their unified interface to function calling (bind_tools with pydantic class).
Workaround (which doesn't work)
From the function call response, I successfully assembled the required syntax for a tool message.
There is no documentation whatsoever on how to correctly handle this with pipecat. Or is there?
Let's say that I can now understand other people's growing frustration with pipecat :)
The text was updated successfully, but these errors were encountered:
After a successful function call, LangchainProcessor correctly returns a function call message.
However, the LLM (e.g. OpenAI or Anthropic) requires to receive a so-called tool message response as acknowledgment that the function call is performed.
As the context contains the tools (as initialized with
context = OpenAILLMContext(messages, tools)
,I think (but not sure) that the acknowledgment is handled for OpenAI in pipecat/src/pipecat/services
/openai.py in this section for handling the context because ):
There is no equivalent of this code section in LangchainProcessor but crucial, as most people use langchain for agents that use tools, or their unified interface to function calling (
bind_tools
with pydantic class).Workaround (which doesn't work)
From the function call response, I successfully assembled the required syntax for a tool message.
Failed sending tool message
However, I couldn't send this successfully to the OpenAI API.
Tried the following methods:
There is no documentation whatsoever on how to correctly handle this with pipecat. Or is there?
Let's say that I can now understand other people's growing frustration with pipecat :)
The text was updated successfully, but these errors were encountered: