diff --git a/tutorials/40_Building_Chat_Application_with_Function_Calling.ipynb b/tutorials/40_Building_Chat_Application_with_Function_Calling.ipynb index 08d87ba..1f1201b 100644 --- a/tutorials/40_Building_Chat_Application_with_Function_Calling.ipynb +++ b/tutorials/40_Building_Chat_Application_with_Function_Calling.ipynb @@ -1127,7 +1127,9 @@ "\n", " ## Append function response to the messages list using `ChatMessage.from_function`\n", " messages.append(ChatMessage.from_function(content=json.dumps(function_response), name=function_name))\n", - " response = chat_generator.run(messages=messages, generation_kwargs={\"tools\": tools})\n", + "\n", + " # After processing all function calls, call `chat_generator.run` once\n", + " response = chat_generator.run(messages=messages, generation_kwargs={\"tools\": tools})\n", "\n", " # Regular Conversation\n", " else:\n",