Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
durmisi committed Mar 17, 2024
1 parent 34b5ac3 commit 9159aaa
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 14 deletions.
3 changes: 0 additions & 3 deletions Core/Chats/AIConversationManager.cs
Original file line number Diff line number Diff line change
@@ -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<string?> ProcessConversationAsync(
Expand All @@ -28,7 +26,6 @@ public AIConversationManager(Kernel kernel,
_logger = logger;
}


public IAsyncEnumerable<StreamingChatMessageContent>? ProcessConversationStreamAsync(
ChatHistory chatHistory,
string? systemPropmpt = null,
Expand Down
1 change: 0 additions & 1 deletion Core/KernelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public static async Task<IKernelMemory> AddSqlServerKernelMemory(
string? schema = null,
CancellationToken ct = default)
{

var kernelMemory = KernelMemoryFactory.WithSqlServerMemoryDb(
new CreateKernelMemoryRequest()
{
Expand Down
6 changes: 3 additions & 3 deletions Core/KernelMemoryFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Check warning on line 13 in Core/KernelMemoryFactory.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'Endpoint' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public string ApiKey { get; set; }

Check warning on line 14 in Core/KernelMemoryFactory.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'ApiKey' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public string ConnectionString { get; set; }

Check warning on line 15 in Core/KernelMemoryFactory.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'ConnectionString' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public string? Schema { get; set; }
}

Expand Down
3 changes: 0 additions & 3 deletions Core/SematicKernelBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static SematicKernelBuilder Create(string defaultEndpoint, string default
};
}


public SematicKernelBuilder AddAIChatCompletion(
string? endpoint = null,
string? apiKey = null,
Expand Down Expand Up @@ -148,8 +147,6 @@ public SematicKernelBuilder AddLogging(ILoggerFactory loggerFactory)
return this;
}



public Kernel Build()
{
return _kernelBuilder.Build();
Expand Down
4 changes: 1 addition & 3 deletions OpenAIExtensions.Tests/Base/IntegrationTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected IntegrationTestBase(ITestOutputHelper outputHelper)

_loggerFactory = LoggerFactory
.Create(x => x.AddConsole());

_outputHelper = outputHelper;
}

Expand All @@ -37,7 +37,5 @@ protected void WriteToConsole(string? message = null)
_outputHelper.WriteLine(message);
}
}


}
}
1 change: 0 additions & 1 deletion OpenAIExtensions.Tests/KernelMemoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9159aaa

Please sign in to comment.