diff --git a/Core/Chats/AIConversationManager.cs b/Core/Chats/AIConversationManager.cs index 4d631eb..c02551d 100644 --- a/Core/Chats/AIConversationManager.cs +++ b/Core/Chats/AIConversationManager.cs @@ -1,12 +1,10 @@ using Microsoft.Extensions.Logging; -using Microsoft.KernelMemory; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.ChatCompletion; using Microsoft.SemanticKernel.Connectors.OpenAI; namespace OpenAIExtensions.Chats { - public interface IAIConversationManager { ValueTask ProcessConversationAsync( @@ -28,7 +26,6 @@ public AIConversationManager(Kernel kernel, _logger = logger; } - public IAsyncEnumerable? ProcessConversationStreamAsync( ChatHistory chatHistory, string? systemPropmpt = null, diff --git a/Core/KernelExtensions.cs b/Core/KernelExtensions.cs index 1a30f3f..e28f5df 100644 --- a/Core/KernelExtensions.cs +++ b/Core/KernelExtensions.cs @@ -17,7 +17,6 @@ public static async Task AddSqlServerKernelMemory( string? schema = null, CancellationToken ct = default) { - var kernelMemory = KernelMemoryFactory.WithSqlServerMemoryDb( new CreateKernelMemoryRequest() { diff --git a/Core/KernelMemoryFactory.cs b/Core/KernelMemoryFactory.cs index 8ea70ff..526a39c 100644 --- a/Core/KernelMemoryFactory.cs +++ b/Core/KernelMemoryFactory.cs @@ -10,9 +10,9 @@ namespace OpenAIExtensions { public class CreateKernelMemoryRequest { - public required string Endpoint { get; set; } - public required string ApiKey { get; set; } - public required string ConnectionString { get; set; } + public string Endpoint { get; set; } + public string ApiKey { get; set; } + public string ConnectionString { get; set; } public string? Schema { get; set; } } diff --git a/Core/SematicKernelBuilder.cs b/Core/SematicKernelBuilder.cs index 04f9adc..a80bebb 100644 --- a/Core/SematicKernelBuilder.cs +++ b/Core/SematicKernelBuilder.cs @@ -43,7 +43,6 @@ public static SematicKernelBuilder Create(string defaultEndpoint, string default }; } - public SematicKernelBuilder AddAIChatCompletion( string? endpoint = null, string? apiKey = null, @@ -148,8 +147,6 @@ public SematicKernelBuilder AddLogging(ILoggerFactory loggerFactory) return this; } - - public Kernel Build() { return _kernelBuilder.Build(); diff --git a/OpenAIExtensions.Tests/Base/IntegrationTestBase.cs b/OpenAIExtensions.Tests/Base/IntegrationTestBase.cs index a276d51..53566ba 100644 --- a/OpenAIExtensions.Tests/Base/IntegrationTestBase.cs +++ b/OpenAIExtensions.Tests/Base/IntegrationTestBase.cs @@ -19,7 +19,7 @@ protected IntegrationTestBase(ITestOutputHelper outputHelper) _loggerFactory = LoggerFactory .Create(x => x.AddConsole()); - + _outputHelper = outputHelper; } @@ -37,7 +37,5 @@ protected void WriteToConsole(string? message = null) _outputHelper.WriteLine(message); } } - - } } \ No newline at end of file diff --git a/OpenAIExtensions.Tests/KernelMemoryTests.cs b/OpenAIExtensions.Tests/KernelMemoryTests.cs index e3cb10e..f31ce30 100644 --- a/OpenAIExtensions.Tests/KernelMemoryTests.cs +++ b/OpenAIExtensions.Tests/KernelMemoryTests.cs @@ -83,7 +83,6 @@ You are a helpful friendly assistant. Assert.NotNull(response); Assert.NotEmpty(response); Assert.Contains(temp.ToString(), response); - } public async Task InitializeAsync()