-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Method not found: 'System.ClientModel.ApiKeyCredential System.ClientModel.ApiKeyCredential.op_Implicit(System.String)' #9130
Comments
I am also experiencing this issue in .NET upon updating Azure.AI.OpenAI to 2.0.0. Returning to 2.0.0-beta.5 removes the Method Not Found exception. How can I tell which version of Azure.AI.OpenAI a given version of SK supports? |
I am also encountering this issue. Tried using ApiKeyCredential instead of DefaultCredential as described in #8956 but it didn't solve anything. Had to downgrade Azure.AI.OpenAI to 2.0.0-beta.5 and it is quite problematic as I need Structured Outputs. |
Same here, I need the structured outputs and only solution is to revert to beta 5 |
Please write when issue will be resolved in new version of SK/Azure Open AI packages, right now not possible to upgrade to Azure.AI.OpenAI 2 version, as IChatComplition |
Some update: I don't know if you guys actually use and need specifically Azure.OpenAI, but removing it and doing everything through sk works for now |
Unfortunately I am using solely Azure OpenAI so for me the issue still persists |
Updating to SK v1.22.0 and Azure.AI.OpenAI v2.1.0-beta.1 appears to fix this issue :-) |
@essenbee2 you are right, it does appear to solve the problem. Thanks for the update. @paciox you should try this too |
True. I have bumped packages even higher, should somebody thinking about the same remedy then watch out for this one #9313 while you're on it |
COPY OF:
#8956
which is NOT solved
Describe the bug
Upgraded to v1.21.0 and an integration test started failing with the following:
Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService
----> System.MissingMethodException : Method not found: 'System.ClientModel.ApiKeyCredential System.ClientModel.ApiKeyCredential.op_Implicit(System.String)'.
Looks like the implicit operator was available in System.ClientModel v1.1.0-beta.7 here but has been dropped in the v1.1.0 release here. Looks like the constraint for System.ClientModel >= 1.1.0-beta.7 in Microsoft.SemanticKernel.Connectors.OpenAI v1.20.0 isn't quite true as 2.0.0-beta.12 takes a dependency on System.ClientModel >= v1.1.0 - downgrading to 2.0.0-beta.11 fixes this.
To Reproduce
[Test]
public async Task MissingImplicitOperator()
{
var services = new ServiceCollection();
services.AddKernel();
services.AddOpenAIChatCompletion
(
"gpt-4o",
Environment.GetEnvironmentVariable("OPENAI_API_KEY")!,
Environment.GetEnvironmentVariable("OPENAI_ORG_ID")!
);
await using var provider = services.BuildServiceProvider();
_ = provider.GetRequiredService();
}
Expected behavior
Resolves an instance of OpenAIChatCompletionService
Platform
OS: Windows
IDE: Visual studio 2022
Language: C#
This person suggests:
#8956 (comment)
I tried like shown here:
#8956 (comment)
and it doesn't do anything.
15 days passed, no solution.
What to do?
The text was updated successfully, but these errors were encountered: