This pull request introduces a .NET Client library, tests, and sample along with dependency update for those with known vulnerabilities.
Dependency Updates:
Updated package references in samples/backend/csharp/ChatProtocolBackend.csproj to newer versions due to vulnerabilities in older ones.
Added centralized package version management in sdk/dotnet/Directory.Packages.props.
Client Implementation:
Implemented AiChatProtocolClient class in sdk/dotnet/Client/AIChatClient.cs to handle chat completions and file uploads.
Created IAiChatProtocolClient interface in sdk/dotnet/Client/Interfaces/IAiChatProtocolClient.cs to define the contract for the chat client.
Added AIChatClientOptions record in sdk/dotnet/Client/AIChatClientOptions.cs to configure the chat client.
Client implementation directly references the models, protocol, etc. from the backend area of the project. Ideally, this would be refactored into a Protocol library, but I did not do that with this PR to avoid a large change.
Sample
Added a sample Console App that shows how to configure & use AiChatProtocolClient object via Dependency Injection standards.
Test Coverage:
Added unit tests for AiChatProtocolClient in sdk/dotnet/Tests/Client.Tests/AiChatProtocolClientTests.cs to verify functionality.
Created test project configuration in sdk/dotnet/Tests/Client.Tests/Client.Tests.csproj and sdk/dotnet/Tests/Directory.Build.props. [1][2]
Solution Configuration:
Added solution file sdk/dotnet/dotnet.sln to include the client and test projects.
Addresses #62
This pull request introduces a .NET Client library, tests, and sample along with dependency update for those with known vulnerabilities.
Dependency Updates:
samples/backend/csharp/ChatProtocolBackend.csproj
to newer versions due to vulnerabilities in older ones.sdk/dotnet/Directory.Packages.props
.Client Implementation:
AiChatProtocolClient
class insdk/dotnet/Client/AIChatClient.cs
to handle chat completions and file uploads.IAiChatProtocolClient
interface insdk/dotnet/Client/Interfaces/IAiChatProtocolClient.cs
to define the contract for the chat client.AIChatClientOptions
record insdk/dotnet/Client/AIChatClientOptions.cs
to configure the chat client.backend
area of the project. Ideally, this would be refactored into aProtocol
library, but I did not do that with this PR to avoid a large change.Sample
AiChatProtocolClient
object via Dependency Injection standards.Test Coverage:
AiChatProtocolClient
insdk/dotnet/Tests/Client.Tests/AiChatProtocolClientTests.cs
to verify functionality.sdk/dotnet/Tests/Client.Tests/Client.Tests.csproj
andsdk/dotnet/Tests/Directory.Build.props
. [1] [2]Solution Configuration:
sdk/dotnet/dotnet.sln
to include the client and test projects.