You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the Microsoft.Extensions.AI.IChatClient interface in my code (to be able to call ChatGPT, Anthropic, Mistral etc.).
The problem is that as soon as I add this line of code:
client = new OpenAIService(new OpenAIOptions { ApiKey = key });
I get this error at runtime :
System.MissingMethodException: Method not found: '!!0 Microsoft.Extensions.AI.IChatClient.GetService(System.Object)'.
Any idea why?
Betalgo.Ranul.OpenAI v9.0.0
.NET 9.0
The text was updated successfully, but these errors were encountered:
Here is a sample project that reproduces the exception. Bug.zip
Actually, the error only occurs when I reference the other packages (Anthropic.SDK and Mistral.SDK), so it might be a conflict between the three packages. I have also contacted the owners of the other packages, as the issue may not be with your package.
"I noted when I removed Betalgo.Ranul.OpenAI, the app seems to run fine. This does appear to be some sort of version conflict and I note that there are some dependency mismatches between my libraries and theirs, but not related to IChatClient...it just has a LOT of dependencies so it's a little tough to tell where exactly the conflict is coming from"
I think this is because Microsoft.Extensions.AI.Abstractions is still in preview, and we are using a different version of the preview model. I may need to update it to the latest version and fix the missing implementation.
Hi,
I want to use the Microsoft.Extensions.AI.IChatClient interface in my code (to be able to call ChatGPT, Anthropic, Mistral etc.).
The problem is that as soon as I add this line of code:
client = new OpenAIService(new OpenAIOptions { ApiKey = key });
I get this error at runtime :
System.MissingMethodException: Method not found: '!!0 Microsoft.Extensions.AI.IChatClient.GetService(System.Object)'.
Any idea why?
Betalgo.Ranul.OpenAI v9.0.0
.NET 9.0
The text was updated successfully, but these errors were encountered: