pipecat icon indicating copy to clipboard operation
pipecat copied to clipboard

Multiple function calls openai

Open cristobal-larach opened this issue 7 months ago • 4 comments

in the file services.openai.py, why is line 147 function_name += tool_call.function.name and not function_name = tool_call.function.name?

In particular, i am getting the following error: Uncaught exception in LLMUserContextAggregator#0: The LLM tried to call a function named 'collect_namecollect_agecollect_payment_method', but there isn't a callback registered for that function.

it happens whenever i execute a function, for example, giving my full name, then the flow goes on to collecting my age, and i try to correct my full name saying "oh, i am sorry, my name is not {previous}. it is {new_name}". I have noticed that in the patient-intake example, every function call modifies the context and just allows one function tool. Can i keep a context with many function tools (so as to call them more than once during the flow of events).??

cristobal-larach avatar Jul 10 '24 21:07 cristobal-larach