Method not found: 'Void Azure.AI.OpenAI.AzureOpenAIClientOptions.set_ApplicationId(System.String) #822
-
Context / ScenarioFollowing upgrading to
Possible causeAfter some further investigation it seems to be related to <PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.5" /> It doesn't with <PackageReference Include="Azure.AI.OpenAI" Version="2.0.0-beta.6" /> or <PackageReference Include="Azure.AI.OpenAI" Version="2.0.0" /> It looks like it the issue there might be related to a property name change; - Core.TelemetryDetails telemetryDetails = new(typeof(AzureOpenAIClient).Assembly, options?.ApplicationId);
+ Core.TelemetryDetails telemetryDetails = new(typeof(AzureOpenAIClient).Assembly, options?.UserAgentApplicationId); Before: https://github.com/Azure/azure-sdk-for-net/blob/f5b4dfdd191e90df616209dd4d9d434a769dc8e0/sdk/openai/Azure.AI.OpenAI/src/Custom/AzureOpenAIClient.cs#L302 So if you pin to beta-5 it's fine - but ideally it would be great to fix this in KM I guess? Potential fix?Would the fixes be required here? What happened?The error above happens when we try to use the following code (which worked with previous versions of KM): _memory = new KernelMemoryBuilder()
.WithAzureOpenAITextEmbeddingGeneration(new AzureOpenAIConfig
{
APIType = AzureOpenAIConfig.APITypes.EmbeddingGeneration,
Auth = AzureOpenAIConfig.AuthTypes.AzureIdentity,
Endpoint = $"https://{openAIClientParametersEmbeddings.CognitiveServicesAccountName}.openai.azure.com/",
Deployment = openAIClientParametersEmbeddings.DeploymentName
}) ImportanceI cannot use Kernel Memory with [email protected] Platform, Language, Versions.NET 8, Kernel Memory 0.76.240930.3 Other thoughtsI'm also wondering if I should avoid directly referencing |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
We are also stuck |
Beta Was this translation helpful? Give feedback.
-
That’s an unfortunate side effect of using serverless mode (and beta libraries). This is why we recommend running KM as a service - to keep KM’s internal dependencies separate from your app’s dependencies. If your code references KM serverless classes and explicitly uses For reference:
|
Beta Was this translation helpful? Give feedback.
-
So, where does that leave us? We're still stuck with the same problem even after aligning all versions and prerequisites. Could someone provide a clear and detailed solution, please? |
Beta Was this translation helpful? Give feedback.
That’s an unfortunate side effect of using serverless mode (and beta libraries). This is why we recommend running KM as a service - to keep KM’s internal dependencies separate from your app’s dependencies.
If your code references KM serverless classes and explicitly uses
Azure.AI.OpenAI
, it’s important to align your app with the same version KM is using to prevent breaking changes, especially since the Azure OpenAI library is still in beta. The same applies to any other libraries KM depends on, if different versions are used in your solution.For reference: