Open scotwoodyard-csulb opened 7 hours ago
Here is a code snippet from Startup.cs:
if (configuration.GetValue("AZURE_SEARCH_API_ENDPOINT", "") != "")
{
services.AddSingleton(new AzureSearchChatDataSource()
{
Endpoint = new Uri(configuration.GetValue<string>("AZURE_SEARCH_API_ENDPOINT")),
IndexName = configuration.GetValue<string>("AZURE_SEARCH_INDEX"),
Authentication = DataSourceAuthentication.FromApiKey(configuration.GetValue<string>("AZURE_SEARCH_API_KEY")),
});
}
I am injecting that into SemanctiKernelBot.cs:
private readonly string _instructions;
private readonly string _welcomeMessage;
private readonly string _endpoint;
private readonly string _deployment;
private readonly AzureSearchChatDataSource _chatDataSource;
private readonly string _apiKey;
private readonly CanvasApiClient _canvasDataService;
public SemanticKernelBot(IConfiguration config, ConversationState conversationState, UserState userState, AzureOpenAIClient aoaiClient, AzureSearchChatDataSource chatDataSource, CanvasApiClient canvasDataService, T dialog)
: base(config, conversationState, userState, dialog)
{
_instructions = config["LLM_INSTRUCTIONS"];
_welcomeMessage = config.GetValue("LLM_WELCOME_MESSAGE", "Hello and welcome to the Semantic Kernel Bot Dotnet!");
_endpoint = config["AZURE_OPENAI_API_ENDPOINT"];
_deployment = config["AZURE_OPENAI_DEPLOYMENT_NAME"];
_apiKey = config["AZURE_OPENAI_API_KEY"];
_chatDataSource = chatDataSource;
_canvasDataService = canvasDataService;
}
I am configuring the chat completion options like so:
// Define prompt execution settings
var promptExecutionSettings = new AzureOpenAIPromptExecutionSettings()
{
AzureChatDataSource = _chatDataSource,
ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions
};
I've also noticed that plugins (i.e. the wikipedia plugin) are no longer responding.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful
The previous iteration of the project works as expected.