Class LlmCallBuilder
Builder for the inline step.
public sealed class LlmCallBuilder
Inheritance
Properties
BudgetCostUsd
Per-run cost ceiling in USD. Null = no ceiling. Needs an
public decimal? BudgetCostUsd { get; set; }
BudgetInputTokens
Per-run input-token ceiling (summed across iterations). Null = no ceiling.
public int? BudgetInputTokens { get; set; }
BudgetOutputTokens
Per-run output-token ceiling (summed across iterations). Null = no ceiling.
public int? BudgetOutputTokens { get; set; }
ConversationHeaderName
When set, conversation id is read from this header on the incoming
public string? ConversationHeaderName { get; set; }
ConversationId
Conversation id (when conversation tracking is on).
public string? ConversationId { get; set; }
PropagateToolHeaders
Extra header names propagated from the exchange to every tool call
public List<string> PropagateToolHeaders { get; }
ToolNames
Tool names to resolve from the registry at dispatch time.
public List<string> ToolNames { get; }
Tools
Tools available for this call. Empty when no opt-in was made.
public List<ILlmToolDescriptor> Tools { get; }
UseAllTools
When true, every descriptor in the registry is exposed for this call.
public bool UseAllTools { get; set; }
UserContentFactory
Optional factory for the initial user content. When null, the body of
public Func<IExchange, IReadOnlyList<LlmContentBlock>>? UserContentFactory { get; set; }
Methods
UseAllRegisteredTools()
Exposes every descriptor in the global registry to this call.
public LlmCallBuilder UseAllRegisteredTools()
UseTools(params string[])
Resolves tools by name from the global registry at dispatch time.
public LlmCallBuilder UseTools(params string[] names)
WithBudget(int?, int?, decimal?)
Sets the per-run budget. Only the dimensions you pass are limited; the cost ceiling requires a
public LlmCallBuilder WithBudget(int? inputTokens = null, int? outputTokens = null, decimal? costUsd = null)
WithConversation(string)
Sets the conversation id explicitly.
public LlmCallBuilder WithConversation(string id)
WithConversationFromHeader(string)
Reads the conversation id from the named header on the inbound exchange.
public LlmCallBuilder WithConversationFromHeader(string headerName)
WithPropagatedToolHeaders(params string[])
Opts extra headers into propagation from this exchange to the tool calls of
public LlmCallBuilder WithPropagatedToolHeaders(params string[] names)
WithSystemPrompt(string)
Sets the system prompt.
public LlmCallBuilder WithSystemPrompt(string prompt)
WithTool(ILlmToolDescriptor)
Adds a tool to this call by descriptor instance.
public LlmCallBuilder WithTool(ILlmToolDescriptor tool)
WithTools(params ILlmToolDescriptor[])
Adds multiple tools at once by descriptor instance.
public LlmCallBuilder WithTools(params ILlmToolDescriptor[] tools)
WithUserContent(Func<IExchange, IReadOnlyList<LlmContentBlock>>)
Overrides the user content with a custom factory. Use for multi-block
public LlmCallBuilder WithUserContent(Func<IExchange, IReadOnlyList<LlmContentBlock>> factory)