Class InMemoryPromptTemplateRegistry

Assembly: redb.Route.Llm.dll

In-memory registry — registered templates live only for the process lifetime.

public sealed class InMemoryPromptTemplateRegistry : IPromptTemplateRegistry

Inheritance

Object→InMemoryPromptTemplateRegistry

Implements

Methods

GetAsync(string, string?, IExchange?, CancellationToken)

Returns the requested template. When version is null,

public Task<PromptTemplate?> GetAsync(string name, string? version = null, IExchange? exchange = null, CancellationToken ct = default)

ListAsync(IExchange?, CancellationToken)

Enumerates every version of every template — used for tooling.

public Task<IReadOnlyList<PromptTemplate>> ListAsync(IExchange? exchange = null, CancellationToken ct = default)

SetAsync(PromptTemplate, IExchange?, CancellationToken)

Registers or updates a template version.

public Task SetAsync(PromptTemplate template, IExchange? exchange = null, CancellationToken ct = default)