Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Bug: "GetStreamingChatMessageContentsAsync" is not working properly #6919

Closed
EachShow opened this issue Jun 24, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code stale Issue is stale because it has been open for 90 days with no activity

Comments

@EachShow
Copy link

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 EachShow added the bug Something isn't working label Jun 24, 2024
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code python Pull requests for the Python Semantic Kernel triage labels Jun 24, 2024
@github-actions github-actions bot changed the title Bug: "GetStreamingChatMessageContentsAsync" is not working properly .Net: Bug: "GetStreamingChatMessageContentsAsync" is not working properly Jun 24, 2024
@github-actions github-actions bot changed the title .Net: Bug: "GetStreamingChatMessageContentsAsync" is not working properly Python: Bug: "GetStreamingChatMessageContentsAsync" is not working properly Jun 24, 2024
@markwallace-microsoft markwallace-microsoft removed the python Pull requests for the Python Semantic Kernel label Jun 24, 2024
@markwallace-microsoft markwallace-microsoft changed the title Python: Bug: "GetStreamingChatMessageContentsAsync" is not working properly .Net: Bug: "GetStreamingChatMessageContentsAsync" is not working properly Jun 24, 2024
@RogerBarreto
Copy link
Member

RogerBarreto commented Jun 28, 2024

@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?

@DoguhanHarmanda
Copy link

DoguhanHarmanda commented Jun 30, 2024

@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.

@EachShow
Copy link
Author

EachShow commented Jul 3, 2024

// 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
}

@RogerBarreto RogerBarreto moved this from Bug to Sprint: Done in Semantic Kernel Jul 24, 2024
Copy link

github-actions bot commented Oct 2, 2024

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale Issue is stale because it has been open for 90 days with no activity label Oct 2, 2024
@RogerBarreto
Copy link
Member

@EachShow We had many updates to our streaming APIs regarding the latest 90 days, let me know if you still have this issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code stale Issue is stale because it has been open for 90 days with no activity
Projects
Archived in project
Development

No branches or pull requests

4 participants