AddAzureOpenAIChatCompletion() method not invoking Kernel Functions while using own data.

Ganesh Penke 5 Reputation points
2024-04-21T17:57:51.73+00:00

I am using a semantic kernel package in that we have a method named AddAzureOpenAIChatCompletion() which takes three parameters. This method is able to invoke my kernel functions which i created.
User's image

builder.Services.AddKernel().AddAzureOpenAIChatCompletion(
"abcgpt4",
"https://abc-ai.openai.azure.com/",
XXXXXXX"
).Plugins.AddFromType<DairyFarm>();


But when i am using the overloaded method which takes AzureOpenAIChatCompletionWithDataConfig as parameter through this method i am passing my own data. In the runtime it is not invoking my kernel functions.

var config = new AzureOpenAIChatCompletionWithDataConfig
{
CompletionApiKey = "xxxxxxxxxxxxxxxxxx", 
CompletionApiVersion = "2023-08-01-preview",
CompletionEndpoint = "https://abc-ai.openai.azure.com", 
CompletionModelId = "abcgpt4",
DataSourceApiKey = "XXXXXXXX
DataSourceEndpoint = "https://abc.search.windows.net",
DataSourceIndex = "abc-sample-index"
};
builder.Services.AddKernel().AddAzureOpenAIChatCompletion(config: config).Plugins.AddFromType<Dairy Farm>();

User's image

I getting response generated using my own data but my kernel functions aren't getting invoked when i have a request which requires kernel function. But I would like to use my own data as well as the kernel functions to generate the responses.

Kindly look into this issue. I would be glad if the issue is resolved as soon as possible.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,243 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,430 questions
{count} votes