qwen.ASPClient
1.0.0
dotnet add package qwen.ASPClient --version 1.0.0
NuGet\Install-Package qwen.ASPClient -Version 1.0.0
<PackageReference Include="qwen.ASPClient" Version="1.0.0" />
<PackageVersion Include="qwen.ASPClient" Version="1.0.0" />
<PackageReference Include="qwen.ASPClient" />
paket add qwen.ASPClient --version 1.0.0
#r "nuget: qwen.ASPClient, 1.0.0"
#addin nuget:?package=qwen.ASPClient&version=1.0.0
#tool nuget:?package=qwen.ASPClient&version=1.0.0
Qwen.ASPClient
Qwen.ASPClient is a lightweight and efficient ASP.NET wrapper for the Qwen AI API, providing seamless integration into .NET applications.
Features
- Simple and fluent API
- Supports Dependency Injection
- Built-in error handling
- Utilizes
HttpClient
best practices for performance
Installation
Install the package via NuGet:
dotnet add package Qwen.ASPClient
Usage Example
var client = new QwenClient("your-api-key");
var response = await client.GenerateResponseAsync("Hello Qwen!");
Console.WriteLine(response.Choices[0].Message.Content);
Dependency Injection
To register the client in an ASP.NET Core application:
services.AddSingleton<IQwenClient>(provider =>
new QwenClient(Configuration["Qwen:ApiKey"]));
Error Handling
The library provides structured error handling with custom exceptions:
try
{
var response = await client.GenerateResponseAsync("Tell me a joke!");
Console.WriteLine(response.Choices[0].Message.Content);
}
catch (QwenException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature-name
) - Commit your changes (
git commit -m "Add new feature"
) - Push to the branch (
git push origin feature-name
) - Open a Pull Request
Reporting Issues
If you encounter any issues or have feature requests, please open an issue on GitHub: Issues
License
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Anwar Al-Hitar
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 113 | 2 months ago |