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

missing method exception #696

Open
sapsari opened this issue Jan 30, 2025 · 0 comments
Open

missing method exception #696

sapsari opened this issue Jan 30, 2025 · 0 comments

Comments

@sapsari
Copy link

sapsari commented Jan 30, 2025

Describe the bug
Getting exception below when trying to use OpenAIService as Microsoft.Extensions.AI.IChatClient
Using the .netstandard2.0 version

Your code piece

	completionResponse = ChatClient.CompleteStreamingAsync(chatMessages, options, cancellationToken);
	iterator = completionResponse.GetAsyncEnumerator();
        more = await iterator.MoveNextAsync();

Result
Exception thrown at iterator.MoveNextAsync()

Expected behavior
No exceptions

Desktop (please complete the following information):

  • OS: Windows 10
  • Target framework of application is .NET 9.0
  • D:_nuget\betalgo.ranul.openai\9.0.1\lib\netstandard2.0\Betalgo.Ranul.OpenAI.dll
  • D:_nuget\microsoft.extensions.ai.abstractions\9.1.0-preview.1.25064.3\lib\netstandard2.0\Microsoft.Extensions.AI.Abstractions.dll

Exception
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'System.String Microsoft.Extensions.AI.ChatResponseFormatJson.get_Schema()'.
Source=Betalgo.Ranul.OpenAI
StackTrace:
at Betalgo.Ranul.OpenAI.Managers.OpenAIService.CreateRequest(IList`1 chatMessages, ChatOptions options)
at Betalgo.Ranul.OpenAI.Managers.OpenAIService.d__32.MoveNext()
at Betalgo.Ranul.OpenAI.Managers.OpenAIService.d__32.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Meryel.Comment2GPT.GptCore.ExtensionsAiAdapter.d__10.MoveNext() in D:\Develop\Comment2GPT\src\GptCore\ExtensionsAiAdapter.cs:line 172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant