semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Bug: Exception thrown with chatCompletionService.GetStreamingChatMessageContentsAsync

Open deepinderdeol opened this issue 2 years ago • 2 comments

Seeing the exception below with this call: chatCompletionService.GetStreamingChatMessageContentsAsync(_skChatHistory, executionSettings, kernel)

  • I see this issue with latest nuget package version 1.24.1
  • The issue is not repro with package version 1.20.0

Exception: System.TypeLoadException HResult=0x80131522 Message=Method 'GetAsyncEnumerator' in type 'OpenAI.Chat.InternalAsyncStreamingChatCompletionUpdateCollection' from assembly 'OpenAI, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b4187f3e65366280' does not have an implementation. Source=OpenAI StackTrace: at OpenAI.Chat.ChatClient.CompleteChatStreamingAsync(IEnumerable1 messages, ChatCompletionOptions options, CancellationToken cancellationToken) at Azure.AI.OpenAI.Chat.AzureChatClient.CompleteChatStreamingAsync(IEnumerable1 messages, ChatCompletionOptions options, CancellationToken cancellationToken) at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.<>c__DisplayClass16_1.b__0() at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.RunRequest[T](Func`1 request) at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.d__16.MoveNext() at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.d__16.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)

deepinderdeol avatar Oct 18 '24 23:10 deepinderdeol

Hi @deepinderdeol, thanks for the issue.

At first looks like you are referencing a different version of OpenAI SDK than the expected 2.1.0-beta.1 in your solution.

Can you provide more details on the references and how I can reproduce the above error? Possibly including the code for chathistory , settings and the kernel ?

Thanks

rogerbarreto avatar Oct 25 '24 08:10 rogerbarreto

Closing this as no more feedback was provided and potentially the OpenAI version used was previous to 2.1.0-beta.1

rogerbarreto avatar Nov 06 '24 15:11 rogerbarreto