Class LlmBuilder

Assembly: redb.Route.Llm.dll

Fluent builder for LLM endpoint URIs.

public sealed class LlmBuilder

Inheritance

Object→LlmBuilder

Methods

AsUri()

Returns the URI string. Useful for .To(builder.AsUri()) overloads that take string.

public string AsUri()

Audit(string, string)

Adds one audit tag to the run. value may be a literal

public LlmBuilder Audit(string key, string value)

Budget(int?, int?, decimal?)

Per-run budget. Only the dimensions you pass reach the URI — an omitted ceiling stays absent,

public LlmBuilder Budget(int? inputTokens = null, int? outputTokens = null, decimal? costUsd = null)

CacheSystemPrompt()

Asks the provider to cache the system prompt across turns

public LlmBuilder CacheSystemPrompt()

ConversationFromHeader()

Tracks conversation by reading llm.conversation.id header.

public LlmBuilder ConversationFromHeader()

ConversationFromRoute()

Tracks conversation using the route id as conversation key.

public LlmBuilder ConversationFromRoute()

InitialBody(string)

Initial body template for scheduled consumers.

public LlmBuilder InitialBody(string bodyRef)

MaxIterations(int)

Maximum tool-loop iterations.

public LlmBuilder MaxIterations(int n)

MaxTokens(int)

Maximum output tokens.

public LlmBuilder MaxTokens(int v)

PromptTemplate(string, string)

Locks the prompt-template (name, version) pair onto every persisted row

public LlmBuilder PromptTemplate(string name, string version)

PropagateToolHeaders(params string[])

Opts extra headers into propagation from this exchange to every tool call

public LlmBuilder PropagateToolHeaders(params string[] names)

Schedule(string)

Schedule for consumer mode (cron or fixed interval).

public LlmBuilder Schedule(string s)

Stream(LlmStreamMode)

Streams the step: — every model call streamed inside the route, tools and

public LlmBuilder Stream(LlmStreamMode mode)

SystemPromptRef(string)

Reference (or literal) for system-prompt template.

public LlmBuilder SystemPromptRef(string r)

Temperature(double)

Sampling temperature.

public LlmBuilder Temperature(double v)

Tools(string)

Tool exposure filter — "*" for every descriptor in the registry,

public LlmBuilder Tools(string filter)

TopP(double)

Top-p sampling.

public LlmBuilder TopP(double v)

ToString()

Returns a string that represents the current object.

public override string ToString()

UseAllTools()

Exposes every descriptor registered in the global tool registry.

public LlmBuilder UseAllTools()

User(string)

Principal identifier for audit — literal value ("system") or a

public LlmBuilder User(string expression)