.Net: Bug: "GetStreamingChatMessageContentsAsync" is not working properly
Describe the bug "GetStreamingChatMessageContentsAsync" is not working properly
To Reproduce update Microsoft.SemanticKernel.Connectors to V1.15.0
Expected behavior Receive streaming output correctly
Screenshots
Platform
- OS: Windows
- IDE: Visual Studio
- Language: C#, Python
- Source: NuGet Microsoft.SemanticKernel.Connectors 1.15.0
Additional context the exception info: Method not found: 'System.String Microsoft.SemanticKernel.FunctionResultContent.get_Id()'.|System.MissingMethodException: Method not found: 'System.String Microsoft.SemanticKernel.FunctionResultContent.get_Id()'. at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetRequestMessages(ChatMessageContent message, ToolCallBehavior toolCallBehavior) at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.CreateChatCompletionsOptions(OpenAIPromptExecutionSettings executionSettings, ChatHistory chatHistory, Kernel kernel, String deploymentOrModelName) at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetStreamingChatMessageContentsAsync(ChatHistory chat, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)+MoveNext() at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetStreamingChatMessageContentsAsync(ChatHistory chat, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
@EachShow, mind providing some pieces of the code you are using?
This is a very central API method where we have plenty of UnitTests, we need to understand what's the context of this error.
Are you using it against OpenAI/Azure OpenAI or Non-OpenAI models?
@RogerBarreto I was able to reproduce this issue by also adding the Google connector package: Microsoft.SemanticKernel.Connectors.Google" Version="1.15.0-alpha" When you then try using the OpenAIChatCompletion, you will encounter the error.
// I using it against Azure OpenAI
var chat = new AzureOpenAIChatCompletionService(....); var response = chat.GetStreamingChatMessageContentsAsync(chatHistory);
await foreach (var item in response) // the exception is occurred here { // do something }
This issue is stale because it has been open for 90 days with no activity.
@EachShow We had many updates to our streaming APIs regarding the latest 90 days, let me know if you still have this issue.
Thanks.