-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
When using GroupChatOrchestration with 2 or more OpenAIResponseAgent's and an InteractiveReplyCallback, if one of the agents calls a Function, then asks for UserInput, the input is received, the next agent to be invoked will (silently) fail as there is a FunctionCall and FunctionCallResponse messages, and then the chat indefinitely hangs.
It fails because these lines throw when there is unexpected input:
- Throws when item is FunctionCall and FunctionCallResponse (As well as others):
internal static ResponseContentPart ToResponseContentPart(this KernelContent content) - Throws when message role is "tool":
semantic-kernel/dotnet/src/Agents/OpenAI/Extensions/ChatContentMessageExtensions.cs
Line 44 in e73446e
public static ResponseItem ToResponseItem(this ChatMessageContent message)
To Reproduce
Steps to reproduce the behavior:
- Create a GroupOrchestrationChat with 2 OpenAIResponseAgent's
- Add a function call to one of them
- Get one of the agents to call the function, then stop and ask for User Input
- Respond with user input, try continue the conversation with the other Agent
- Will indefinitely hang
Expected behavior
It should not hang, and the conversation should continue as expected.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
- Language: C#
- Source: NuGet package 1.65.0
- AI model: GPT-4.1
- IDE: VS Code
- OS: Windows