Plugin.Maui.Spine.AI.Functions
0.1.26
dotnet add package Plugin.Maui.Spine.AI.Functions --version 0.1.26
NuGet\Install-Package Plugin.Maui.Spine.AI.Functions -Version 0.1.26
<PackageReference Include="Plugin.Maui.Spine.AI.Functions" Version="0.1.26" />
<PackageVersion Include="Plugin.Maui.Spine.AI.Functions" Version="0.1.26" />
<PackageReference Include="Plugin.Maui.Spine.AI.Functions" />
paket add Plugin.Maui.Spine.AI.Functions --version 0.1.26
#r "nuget: Plugin.Maui.Spine.AI.Functions, 0.1.26"
#:package Plugin.Maui.Spine.AI.Functions@0.1.26
#addin nuget:?package=Plugin.Maui.Spine.AI.Functions&version=0.1.26
#tool nuget:?package=Plugin.Maui.Spine.AI.Functions&version=0.1.26
Plugin.Maui.Spine.AI.Functions
Functions the model calls, declared once for a Spine app and its server. A function runs on the device, on the server, or on either, in an order the app can change per conversation. On the server it knows who is calling: the signed-in user's id, claims and details reach it through a context the model never sees. Every call is logged.
dotnet add package Plugin.Maui.Spine.AI.Functions
// In a project the app and the server both reference.
public static class Functions
{
public static SpineAIFunction GetMyBookings { get; } = SpineAIFunction.Create(
"get_my_bookings", "Lists the signed-in user's bookings.", GetMyBookingsAsync, SpineAIFunctionSide.Server);
static async Task<object> GetMyBookingsAsync(SpineAIFunctionContext context, int? days)
{
if (await context.GetUserAsync() is not { } user) return SpineAIFunctionResult.SignInRequired();
return await Bookings.ForAsync(user.Id, days ?? 30, context.CancellationToken);
}
}
// The server: AddSpineAI(..., ai => ai.Functions.Add(Functions.GetMyBookings)); and "Functions": ["get_my_bookings"] on a feature.
// The app: UseSpineAI(o => o.Functions.Add(Functions.ShowTime)); shared with UseSpineVoice.
Plugin.Maui.Spine.AI, .Voice and .Server.AI reference it. See the AI server and AI client pages.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.AI.Abstractions (>= 10.10.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Plugin.Maui.Spine.Common (>= 0.1.26)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Plugin.Maui.Spine.AI.Functions:
| Package | Downloads |
|---|---|
|
Plugin.Maui.Spine.Voice
Voice for Spine apps: a full-duplex audio engine with the platform's echo cancellation, PCM16 in and out at a provider's rate, a playback queue that can be flushed when the user talks over the answer, and levels and 24 bands each way for visuals. The base for realtime voice AI. |
|
|
Plugin.Maui.Spine.AI
AI in a Spine app without keys in the app: one IChatClient per named feature that streams from the app's Spine.Server.AI backend, can try an on-device model first, answers "off", budget and rate limits in one shape, and counts on-device usage on the device. |
|
|
Plugin.Maui.Spine.Server.AI
AI on the server for Spine apps: named features with the provider in configuration, every token and image metered and priced, budgets and per-user limits, and endpoints for ASP.NET Core and Azure Functions. Built on Microsoft.Extensions.AI. |
GitHub repositories
This package is not used by any popular GitHub repositories.