Which package does this comes under AzureSearchChatExtensionConfiguration

Shreyas Udupa 0 Reputation points
2024-10-10T11:25:38.48+00:00

I referred this blog post to connect my Azure OpenAI model to build one of the project. https://devblogs.microsoft.com/semantic-kernel/azure-openai-on-your-data-with-semantic-kernel/

But unfortunately, at this step AzureSearchChatExtensionConfiguration is not recognized by Microsoft.SemanticKernel namespace. Installed Packages are Microsoft.SemanticKernel 1.12.1 version.

Also tried installing Azure.AI.OpenAI 2.0.0 version but didnt work.

I need help in how to connect my azure service to semantic kernel.

var azureSearchExtensionConfiguration = new AzureSearchChatExtensionConfiguration
{
    SearchEndpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_AI_SEARCH_ENDPOINT")),
    Authentication = new OnYourDataApiKeyAuthenticationOptions(Environment.GetEnvironmentVariable("AZURE_AI_SEARCH_API_KEY")),
    IndexName = Environment.GetEnvironmentVariable("AZURE_AI_SEARCH_INDEX")
};

var chatExtensionsOptions = new AzureChatExtensionsOptions { Extensions = { azureSearchExtensionConfiguration } };
var executionSettings = new OpenAIPromptExecutionSettings { AzureChatExtensionsOptions = chatExtensionsOptions };

var result = await kernel.InvokePromptAsync("What are my available health plans?", new(executionSettings));
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,918 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,234 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 24,910 Reputation points Microsoft Employee
    2024-10-10T14:23:32.7233333+00:00

    @Shreyas Udupa Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    .

    AzureSearchChatExtensionConfiguration is part of Azure.AI.OpenAI. Please uninstall all the existing package versions of Azure.AI.OpenAI and install the below version and test this:

    dotnet add package Azure.AI.OpenAI --version 1.0.0-beta.14

    I found the below in the change log of the SDK.

    Renamed "AzureCognitiveSearch" to "AzureSearch":
    AzureCognitiveSearchChatExtensionConfiguration is now AzureSearchChatExtensionConfiguration
    

    More info here.

    .

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.