pipecat icon indicating copy to clipboard operation
pipecat copied to clipboard

llm.handleFunctionCall only receives functionName, no arguments

Open FaBeyyy opened this issue 7 months ago • 3 comments

pipecat version

latest main branch

Python version

3.12

Operating System

macos 15

Issue description

On the latest main branch, the llm.handleFunctionCall(async (props) => { ... }) function is invoked only with the functionName, but none of the expected arguments (arguments, args, etc.) are included in props. However, the onLLMFunctionCall handler correctly receives the arguments object (typed incorrectl though )with the expected data.

Reproduction steps

Clone the repo and check out the latest main branch.

Set up an LLM instance with both llm.handleFunctionCall and onLLMFunctionCall defined.

Trigger a tool/function call via the LLM.

Observe the props received by llm.handleFunctionCall.

Expected behavior

llm.handleFunctionCall should receive a props object that includes the arguments or args, similar to what is passed to onLLMFunctionCall.

Actual behavior

llm.handleFunctionCall only receives the functionName, and the arguments are missing entirely from the props object.

Logs


FaBeyyy avatar May 02 '25 10:05 FaBeyyy

Just to clarify, when you are referring to llm.handleFunctionCall, are you referring to the client-js and react API?

mattieruth avatar May 07 '25 16:05 mattieruth

Just to clarify, when you are referring to llm.handleFunctionCall, are you referring to the client-js and react API?

Yes

FaBeyyy avatar May 08 '25 14:05 FaBeyyy

Can you verify if this goes away with the fix that went into 0.67.0?

mattieruth avatar May 08 '25 19:05 mattieruth