Open EachShow opened 2 months ago
@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 }
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
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.GetResult()