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

.Net: Issues when using SK 1.14.1 with Azure.AI.OpenAI 2.0.0-beta-1

Open essenbee2 opened this issue 1 year ago • 4 comments

Describe the bug I installed SK 1.14.1 and Azure.AI.OpenAI 2.0.0-beta-1. The following lines of code now have red underlining for the calls to .AddAzureOpenAITextEmbeddingGeneration() and .AddAzureOpenAIChatCompletion():

            kernelBuilder = kernelBuilder.AddAzureOpenAITextEmbeddingGeneration(embeddingModelName, endpoint, tokenCredential ?? new DefaultAzureCredential());
            kernelBuilder = kernelBuilder.AddAzureOpenAIChatCompletion(deployedModelName, endpoint, tokenCredential ?? new DefaultAzureCredential());

The error for both lines in the same and as follows:

image

Expected behaviour SK should work with the AzureOpenAIClient that is part of Azure.AI.OpenAI 2.0.0-beta-1

Platform

  • OS: Windows
  • IDE: Visual Studio 2022
  • Language: C#
  • Source: SK 1.14.1, Azure.AI.OpenAI 2.0.0-beta-1

essenbee2 avatar Jun 08 '24 14:06 essenbee2

Thanks, @essenbee2! And sorry for the hassle--this is a pain, but one we're hoping to consolidate into a one-time irritation.

As implied with the major version bump from v1.0.0-beta.17 and v2.0.0-beta.1, the new .NET library will require some migration steps; in that regard, SK is in the same boat as directly using the OpenAI SDK. Please stick with the v1.0.0-beta* libraries until all the dependency integration is complete.

trrwilson avatar Jun 10 '24 22:06 trrwilson

Will do, and thanks :-)

essenbee2 avatar Jun 12 '24 13:06 essenbee2

Hello,

Do you have any ETA when this will be available? When SK will use the v2.0.0-beta* of Azure OpenAI SDK?

Thank you.

rliberoff avatar Jul 01 '24 08:07 rliberoff

I also wonder if you have an ETA on when the dependency will be upgraded. I come from this issue which is blocking our development. https://github.com/Azure/azure-sdk-for-net/issues/43952 Since there is a new version of the package, I think we should see if the new version has already fixed the issue and then decide on how to fix the issue.

JasonYeMSFT avatar Jul 17 '24 21:07 JasonYeMSFT

All those errors are mitigated with our new 1.18.0-rc package with the latest OpenAI Connectors using the latest Azure and OpenAI underlying official SDKs.

Please let us know if you are able to use them for your current scenarios.

We also added a dedicated Migration Guideline in our learn site in here

rogerbarreto avatar Aug 29 '24 13:08 rogerbarreto