Vorn.Ai.Client
9.1.2
dotnet add package Vorn.Ai.Client --version 9.1.2
NuGet\Install-Package Vorn.Ai.Client -Version 9.1.2
<PackageReference Include="Vorn.Ai.Client" Version="9.1.2" />
<PackageVersion Include="Vorn.Ai.Client" Version="9.1.2" />
<PackageReference Include="Vorn.Ai.Client" />
paket add Vorn.Ai.Client --version 9.1.2
#r "nuget: Vorn.Ai.Client, 9.1.2"
#:package Vorn.Ai.Client@9.1.2
#addin nuget:?package=Vorn.Ai.Client&version=9.1.2
#tool nuget:?package=Vorn.Ai.Client&version=9.1.2
Vorn.Ai.Client
Client library for the Vorn AI host. It provides services for interacting with AI endpoints.
Getting started
- Install the package:
dotnet add package Vorn.Ai.Client
- Register dependencies and add the client:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddTransient<IApiClientService, ApiClientService>(); // from Vorn.Aaas.Client.Api
builder.AddAiClient();
- Consume the services:
app.MapGet("/rewrite", (IAssistantService assistant) =>
assistant.QuickRewriteAsync("Rewrite this text"));
var tool = new ResponderToolDefinition
{
Type = "mcp",
ServerLabel = "mcpqueries",
ServerUrl = "https://your-host.example.com/mcp",
AllowedTools = new[] { "querymcptool1", "querymcptool2" },
RequireApproval = ResponderToolApprovalRequirement.Never
};
var options = new ResponderOptions { Tools = new[] { tool } };
app.MapPost("/response", (IResponseService responses, string prompt)
=> responses.GenerateAsync([ResponderInput.TextInput(prompt)], options));
app.MapPost("/response/approve", (IResponseService responses, string id)
=> responses.GenerateAsync([ResponderInput.McpToolCallApprovalInput(id)], options));
app.MapPost("/response/stream", async (IResponseService responses, string prompt) =>
{
await foreach (var item in responses.StreamAsync([ResponderInput.TextInput(prompt)], options))
{
Console.WriteLine($"{item.GetType().Name}: {System.Text.Json.JsonSerializer.Serialize(item)}");
}
});
app.MapPost("/response/hub", async (IResponseHubClient hub, string prompt) =>
{
await foreach (var item in hub.StreamAsync([ResponderInput.TextInput(prompt)], options))
{
Console.WriteLine($"{item.GetType().Name}: {System.Text.Json.JsonSerializer.Serialize(item)}");
}
});
// Capture the completion output to continue the conversation.
app.MapPost("/response/follow-up", async (IResponseService responses, string prompt, string? previousId) =>
{
var followUpOptions = options with { PreviousResponseId = previousId };
var outputs = await responses.GenerateAsync([ResponderInput.TextInput(prompt)], followUpOptions);
var completion = outputs.FirstOrDefault(o => o.Type == ResponderOutputType.Completion);
return new
{
Outputs = outputs,
NextPreviousResponseId = completion?.Id
};
});
app.MapPost("/response/hub/rewrite", async (IResponseHubClient hub, string prompt) =>
{
await foreach (var item in hub.StreamRewriteAsync(prompt))
{
Console.WriteLine($"{item.GetType().Name}: {System.Text.Json.JsonSerializer.Serialize(item)}");
}
});
app.MapPost("/speech", async (ISpeechToTextService speech, IFormFile file) =>
{
using var stream = file.OpenReadStream();
return await speech.TranscribeAsync(stream, mimeType: file.ContentType);
});
app.MapPost("/speech/hub", async (ISpeechHubClient hub, IFormFile file) =>
{
using var stream = file.OpenReadStream();
return await hub.TranscribeAsync(stream, mimeType: file.ContentType);
});
IResponseService generates model responses, IResponseHubClient streams them via SignalR, IAssistantService handles structured prompts and quick rewrites, ISpeechToTextService transcribes audio streams, and ISpeechHubClient transcribes audio via SignalR.
ResponderOptions.PreviousResponseId can be supplied with the identifier returned by a ResponderOutputType.Completion payload to start a follow-up turn. Reset it to null to begin a new conversation thread.
ResponderOptions.Model overrides the configured default model on a per-call basis. Leave it null to continue using the server's configured default.
| 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Vorn.Aaas.Client.Api (>= 9.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Vorn.Ai.Client:
| Package | Downloads |
|---|---|
|
Vorn.Interface
This library is designed to provide interface components and services to use VORN infrastructure. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.1.2 | 294 | 11/16/2025 |
| 9.1.1 | 225 | 11/15/2025 |
| 9.1.0 | 174 | 11/15/2025 |
| 9.0.2 | 267 | 11/10/2025 |
| 9.0.1 | 184 | 11/9/2025 |
| 9.0.0 | 203 | 11/5/2025 |
| 8.9.7 | 273 | 11/30/2025 |
| 8.9.6 | 271 | 11/30/2025 |
| 8.9.5 | 275 | 11/30/2025 |
| 8.9.4 | 136 | 11/29/2025 |
| 8.9.3 | 133 | 11/29/2025 |
| 8.9.2 | 184 | 11/23/2025 |
| 8.9.1 | 178 | 11/23/2025 |
| 8.9.0 | 225 | 11/9/2025 |
| 8.8.0 | 233 | 11/2/2025 |
| 8.7.1 | 228 | 10/29/2025 |
| 8.7.0 | 217 | 10/27/2025 |
| 8.6.2 | 222 | 10/27/2025 |
| 8.6.1 | 172 | 10/25/2025 |
| 8.6.0 | 165 | 10/25/2025 |
| 8.6.0-rc4 | 149 | 10/25/2025 |
| 8.6.0-rc3 | 174 | 10/24/2025 |
| 8.6.0-rc2 | 216 | 10/23/2025 |
| 8.6.0-rc1 | 211 | 10/20/2025 |
| 8.5.1 | 118 | 10/18/2025 |
| 8.5.0 | 146 | 10/18/2025 |
| 8.4.2 | 193 | 10/16/2025 |
| 8.4.1 | 193 | 10/16/2025 |
| 8.4.0 | 189 | 10/16/2025 |
| 8.3.5 | 201 | 10/15/2025 |
| 8.3.4 | 182 | 10/15/2025 |
| 8.3.3 | 215 | 10/15/2025 |
| 8.3.1 | 207 | 10/14/2025 |
| 8.3.0 | 216 | 10/14/2025 |
| 8.3.0-rc4 | 203 | 10/14/2025 |
| 8.3.0-rc3 | 192 | 10/13/2025 |
| 8.3.0-rc2 | 191 | 10/13/2025 |
| 8.3.0-rc1 | 197 | 10/13/2025 |
| 8.2.0-rc9 | 195 | 10/13/2025 |
| 8.2.0-rc8 | 183 | 10/13/2025 |
| 8.2.0-rc7.4 | 126 | 10/12/2025 |
| 8.2.0-rc7 | 186 | 10/12/2025 |
| 8.2.0-rc6 | 164 | 10/12/2025 |
| 8.2.0-rc5 | 167 | 10/12/2025 |
| 8.2.0-rc4.1 | 123 | 10/12/2025 |
| 8.2.0-rc4 | 175 | 10/12/2025 |
| 8.2.0-rc3.1 | 129 | 10/12/2025 |
| 8.2.0-rc3 | 126 | 10/11/2025 |
| 8.2.0-rc10 | 193 | 10/13/2025 |
| 8.2.0-rc1.2 | 78 | 10/11/2025 |
| 8.2.0-rc1.1 | 78 | 10/11/2025 |
| 8.2.0-rc1 | 117 | 10/11/2025 |
| 8.1.0-rc3 | 115 | 10/11/2025 |
| 8.0.10-rc1 | 119 | 10/11/2025 |
| 2.5.0 | 206 | 9/30/2025 |
| 2.4.1 | 193 | 9/30/2025 |
| 2.4.0 | 186 | 9/30/2025 |
| 2.1.0 | 186 | 9/29/2025 |
| 2.0.1 | 185 | 9/29/2025 |
| 2.0.0 | 189 | 9/29/2025 |
| 1.8.0 | 202 | 9/13/2025 |
| 1.7.0 | 187 | 9/11/2025 |
| 1.6.0 | 246 | 9/10/2025 |
| 1.5.0 | 188 | 9/8/2025 |
| 1.4.0 | 275 | 9/3/2025 |
| 1.3.0 | 198 | 9/3/2025 |
| 1.2.0 | 214 | 9/1/2025 |
| 1.1.0 | 200 | 9/1/2025 |
| 1.0.1 | 189 | 9/1/2025 |
| 1.0.0 | 197 | 9/1/2025 |