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

.Net: Dotnet AddAzureOpenAITextEmbeddingGeneration not working with deploymentName, endpoint and ApiKey params

Open ericvdberge opened this issue 2 years ago • 2 comments

Describe the bug I am configuring my .net api to use Azure AI Search for the semantic kernel by adding the AddAzureOpenAITextEmbeddingGeneration extension for the IServiceCollection list by using this code:

services.
    AddAzureOpenAITextEmbeddingGeneration(
        options.DeploymentName,
        options.Endpoint,
         options.ApiKey
    );

With this configuration, I am just getting this wierd error, because i just want to connect my embedding and azure ai search index for my api: 'Microsoft.SemanticKernel.OpenAIServiceCollectionExtensions.AddAzureOpenAITextEmbeddingGeneration(Microsoft.Extensions.DependencyInjection.IServiceCollection, string, string, string, string?, string?)' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.'

To Reproduce Steps to reproduce the behavior:

  1. Go to Visual studio and create a .net 8 core api
  2. Go to the program.cs and use the code as described in the bug description
  3. Build the solution
  4. See error with xode 'SKEXP0011', 'SKEXP0003', 'SKEXP0011', 'SKEXP0021', 'SKEXP0021' in The error list of visual studio

Expected behavior I expect it to just connect with my azureOpenAITextEmbeddingService 'ada' to create an embedding from a user question and use that embedding to somehow search in my already created Azure Ai Search index

Screenshots If applicable, add screenshots to help explain your problem. AzureOpenAiTextEmbeddingError

Platform

  • OS: Windows
  • IDE: Visual Studio
  • Language: C#
  • Source: Microsoft.SemanticKernel namespace and nuget package

ericvdberge avatar Feb 02 '24 11:02 ericvdberge

@ericvdberge Thanks for reporting this issue. Semantic Kernel SDK contains some experimental features, which may be changed/updated in the future, so these errors just notify you about that. In order to resolve this, you will need to suppress these errors by error code (e.g. SKEXP0011, SKEXP0003 and so on).

Here is more information about that: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/docs/EXPERIMENTS.md#experiments image

dmytrostruk avatar Feb 03 '24 19:02 dmytrostruk

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar May 06 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 20 '24 01:05 github-actions[bot]

why i get error instead of warn for SKEXP0001?

LiuKai115 avatar Sep 24 '24 11:09 LiuKai115