-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codePR: ready for reviewAll feedback addressed, ready for reviewsAll feedback addressed, ready for reviewsagentsbugSomething isn't workingSomething isn't workingexperimentalAssociated with an experimental featureAssociated with an experimental feature
Description
Describe the bug
When adding a plugin to the OpenAIAssistantAgent in the Semantic Kernel, a System.NotSupportedException exception occurs when calling chat.InvokeAsync(). The error happens specifically when the plugin is invoked in the flow. This issue does not occur with the ChatCompletionAgent.
Exception has occurred: CLR/System.NotSupportedException
An exception of type 'System.NotSupportedException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'No function result provided in the tool message.'
at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.CreateRequestMessages(ChatMessageContent message)
at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.CreateChatCompletionMessages(OpenAIPromptExecutionSettings executionSettings, ChatHistory chatHistory)
at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.<GetChatMessageContentsAsync>d__15.MoveNext()
at Microsoft.SemanticKernel.Agents.ChatCompletionAgent.<InvokeAsync>d__2.MoveNext()
at Microsoft.SemanticKernel.Agents.ChatCompletionAgent.<InvokeAsync>d__2.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Agents.ChatHistoryChannel.<InvokeAsync>d__1.MoveNext()
at Microsoft.SemanticKernel.Agents.ChatHistoryChannel.<InvokeAsync>d__1.MoveNext()
at Microsoft.SemanticKernel.Agents.ChatHistoryChannel.<InvokeAsync>d__1.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Agents.AgentChat.<InvokeAgentAsync>d__22.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentChat.<InvokeAgentAsync>d__22.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentChat.<InvokeAgentAsync>d__22.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__15.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__15.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__15.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__13.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__13.MoveNext()
at Microsoft.SemanticKernel.Agents.AgentGroupChat.<InvokeAsync>d__13.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Program.<<Main>$>d__0.MoveNext() in c:\dev\projects\dotnet\sk-multiagent-verification\Program.cs:line 90
at Program.<<Main>$>d__0.MoveNext() in c:\dev\projects\dotnet\sk-multiagent-verification\Program.cs:line 90
To Reproduce
Steps to reproduce the behavior:
- Go to the following Semantic Kernel sample: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/Agents/MixedChat_Agents.cs
- Add a plugin to the OpenAIAssistantAgent.
- Adjust the prompt for OpenAIAssistantAgent to ensure the plugin is triggered.
- Run the sample
Expected behavior
The expected behavior is that the agent group successfully concludes the conversation by calling the plugin, without throwing a System.NotSupportedException when invoking chat.InvokeAsync().
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
- OS: Windows 11
- IDE: Visual Studio, VS Code
- Language: C#
- Source:
- Microsoft.SemanticKernel version 1.22.0
- Microsoft.SemanticKernel.Agents.Core version 1.22.0-alpha
- Microsoft.SemanticKernel.Agents.OpenAI version 1.22.0-alpha
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codePR: ready for reviewAll feedback addressed, ready for reviewsAll feedback addressed, ready for reviewsagentsbugSomething isn't workingSomething isn't workingexperimentalAssociated with an experimental featureAssociated with an experimental feature
Type
Projects
Status
Sprint: Done