I followed readme @ https://github.com/microsoft/semantic-kernel/tree/main/dotnet/src/Connectors/Connectors.Memory.Kusto#microsoftsemantickernelconnectorsmemorykusto.
Please find the code snippet below. The code is compiling and running fine. On running it never prompt for authentication and when my prompt was to fetch top 10 row from a Kusto table in the db, instead of returning data, it returned query to fetch data from the Kusto table. Could you please let me know if I am missing anything here?
Code Snippet:
using Kusto.Data;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.Memory.Kusto;
using Skills;
// Load the kernel settings
var kernelSettings = KernelSettings.LoadSettings();
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(kustoUri).WithAadUserPromptAuthentication(authority);
KustoMemoryStore memoryStore = new(kustoConnectionStringBuilder, databaseName);
// Create the host builder with logging configured from the kernel settings.
var builder = Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddConsole();
logging.SetMinimumLevel(kernelSettings.LogLevel ?? LogLevel.Warning);
});
builder.ConfigureServices((context, services) =>
{
var kernel = Kernel.Builder
.WithAzureTextEmbeddingGenerationService("text-embedding-ada-002", endpoint, key)
.WithAzureChatCompletionService("gpt-35-turbo", endpoint, key)
.WithMemoryStorage(memoryStore)
.Build();
// Add Semantic Kernel to the host builder
services.AddSingleton<IKernel>(kernel);
// Add kernel settings to the host builder
services.AddSingleton<KernelSettings>(kernelSettings);
// Add Native Skills to the host builder
services.AddSingleton<ConsoleSkill>();
services.AddSingleton<ChatSkill>();
// Add the primary hosted service to the host builder to start the loop.
services.AddHostedService();
});
// Build and run the host. This keeps the app running using the HostedService.
var host = builder.Build();
await host.RunAsync();
I followed readme @ https://github.com/microsoft/semantic-kernel/tree/main/dotnet/src/Connectors/Connectors.Memory.Kusto#microsoftsemantickernelconnectorsmemorykusto.
Please find the code snippet below. The code is compiling and running fine. On running it never prompt for authentication and when my prompt was to fetch top 10 row from a Kusto table in the db, instead of returning data, it returned query to fetch data from the Kusto table. Could you please let me know if I am missing anything here?
Code Snippet:
using Kusto.Data;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.Memory.Kusto;
using Skills;
// Load the kernel settings
var kernelSettings = KernelSettings.LoadSettings();
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(kustoUri).WithAadUserPromptAuthentication(authority);
KustoMemoryStore memoryStore = new(kustoConnectionStringBuilder, databaseName);
// Create the host builder with logging configured from the kernel settings.
var builder = Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddConsole();
logging.SetMinimumLevel(kernelSettings.LogLevel ?? LogLevel.Warning);
});
builder.ConfigureServices((context, services) =>
{
var kernel = Kernel.Builder
.WithAzureTextEmbeddingGenerationService("text-embedding-ada-002", endpoint, key)
.WithAzureChatCompletionService("gpt-35-turbo", endpoint, key)
.WithMemoryStorage(memoryStore)
.Build();
// Add the primary hosted service to the host builder to start the loop.
services.AddHostedService();
});
// Build and run the host. This keeps the app running using the HostedService.
var host = builder.Build();
await host.RunAsync();