Ivilson.AI.VllmChatClient
1.1.5
dotnet add package Ivilson.AI.VllmChatClient --version 1.1.5
NuGet\Install-Package Ivilson.AI.VllmChatClient -Version 1.1.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ivilson.AI.VllmChatClient" Version="1.1.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ivilson.AI.VllmChatClient" Version="1.1.5" />
<PackageReference Include="Ivilson.AI.VllmChatClient" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ivilson.AI.VllmChatClient --version 1.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ivilson.AI.VllmChatClient, 1.1.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Ivilson.AI.VllmChatClient&version=1.1.5
#tool nuget:?package=Ivilson.AI.VllmChatClient&version=1.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
It can work for qwen3, qwq32b, gemma3, glm4, glm z1, deepseek-r1 on vllm==v0.8.5. use class VllmQwen3ChatClient ,VllmQwqChatClient ,VllmGemmaChatClient, VllmGlm4ChatClient , VllmGlmZ1ChatClient, VllmDeepseekR1ChatClient
support stream function call .
https://github.com/ivilson/ivilson.ai.vllmchatclient
using Microsoft.Extensions.AI
string apiurl = "http://localhost:8000/{0}/{1}";
[Description("Gets the weather")]
static string GetWeather() => Random.Shared.NextDouble() > 0.5 ? "It's sunny" : "It's raining";
IChatClient vllmclient = new VllmQwqChatClient(apiurl,null, "qwq");
ChatOptions chatOptions = new()
{
Tools = [AIFunctionFactory.Create(GetWeather)]
};
var messages = new List<ChatMessage>
{
new ChatMessage(ChatRole.System ,"你是一个智能助手,名字叫菲菲"),
new ChatMessage(ChatRole.User,"今天天气如何?")
};
private async Task<(string answer, string reasoning)> StreamChatResponseAsync(List<ChatMessage> messages, ChatOptions chatOptions)
{
string answer = string.Empty;
string reasoning = string.Empty;
await foreach (var update in _chatClient.GetStreamingResponseAsync(messages, chatOptions))
{
var updateText = update.ToString();
if (update is ReasoningChatResponseUpdate reasoningUpdate)
{
if (!reasoningUpdate.Thinking)
{
answer += updateText;
}
else
{
reasoning += updateText;
}
}
else
{
answer += updateText;
}
}
return (answer, reasoning);
}
var (answer, reasoning) = await StreamChatResponseAsync(messages, chatOptions);
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- McpDotNet.Extensions.AI (>= 1.1.0.1)
- Microsoft.Extensions.AI.Abstractions (>= 9.3.0-preview.1.25161.3)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.