Respire.AI 0.11.0

Prefix Reserved
dotnet add package Respire.AI --version 0.11.0
                    
NuGet\Install-Package Respire.AI -Version 0.11.0
                    
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="Respire.AI" Version="0.11.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Respire.AI" Version="0.11.0" />
                    
Directory.Packages.props
<PackageReference Include="Respire.AI" />
                    
Project file
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 Respire.AI --version 0.11.0
                    
#r "nuget: Respire.AI, 0.11.0"
                    
#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.
#:package Respire.AI@0.11.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Respire.AI&version=0.11.0
                    
Install as a Cake Addin
#tool nuget:?package=Respire.AI&version=0.11.0
                    
Install as a Cake Tool

Respire.AI

Semantic response caching for Microsoft.Extensions.AI chat clients, backed by Redis vector search, and exact-text embedding caching with batched misses on ordinary Redis.

Also includes bounded Redis conversation history, UseRespireChatHistory middleware for streaming and non-streaming calls, and RespireChatHistoryProvider for Microsoft Agent Framework. History supports tool calls and results, atomic concurrent appends, trimming, expiry, and clearing; it does not require Redis Search.

Chat history guide.

When composing history with tools, register UseRespireChatHistory before UseFunctionInvocation so history wraps the whole tool loop. Reversing this order is unsupported and duplicates messages during tool iterations. Pass only new messages; repeated system messages are stored again too.

Install

dotnet add package Respire.AI

Usage

using Microsoft.Extensions.AI;
using Respire;
using Respire.AI;

public static class ChatSetup
{
    public static IChatClient Build(
        IChatClient provider,
        IRespireClient redis,
        IEmbeddingGenerator<string, Embedding<float>> embeddings)
        => new ChatClientBuilder(provider)
            .UseRespireSemanticCache(redis, embeddings, new()
            {
                CacheName = "support:model-v1:deployment-v1",
                Dimensions = 1536,
                DistanceThreshold = 0.1,
                TimeToLive = TimeSpan.FromMinutes(30),
                ScopeSelector = (_, options) =>
                    options?.AdditionalProperties?.TryGetValue("UserId", out var user) == true
                        ? user as string : null,
            })
            .Build();
}

Supply your chat provider and embedding generator, and match Dimensions to its output. Requires standalone Redis Query Engine. Set UserId in request AdditionalProperties to isolate users; see the guide for scope, bypass, and cache lifetime behavior.

Read the guide for configuration, requirements, and further examples.

For embedding generation, use EmbeddingGeneratorBuilder<string, Embedding<float>>.UseRespireEmbeddingCache with a Redis client and RespireEmbeddingCacheOptions. It preserves batch order, deduplicates misses, stores compact FLOAT32 vectors with optional TTL, and exposes hit/miss metrics. See the embedding cache guide and runnable sample.

Product 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.11.0 46 10/21/2026
0.10.0 84 10/16/2026
0.9.0 87 10/15/2026
0.8.2 84 10/13/2026
0.8.0 81 10/12/2026