Created via FiddlerClient.startGeneration. All setter methods
return this for fluent chaining.
Methods
setCompletion(text: string): this
Set the LLM completion/response text.
Alias for FiddlerSpan.setOutput — writes to gen_ai.llm.output.
setContext(context: string): this
Set the LLM context (e.g. retrieved RAG context) for this generation.
Context string provided to the LLM.
setMessages(messages: Record<string, unknown>[]): this
Set the full input message history sent to the model.
Record<string, unknown>[]
required
Array of chat messages in OpenAI/Anthropic format.
setModel(model: string): this
Set the model identifier (e.g. "gpt-4o", "claude-3-opus").
Model name or identifier string.
setOutputMessages(messages: Record<string, unknown>[]): this
Set the output messages returned by the model.
Record<string, unknown>[]
required
Array of assistant response messages.
setSystem(system: string): this
Set the LLM provider/system (e.g. "openai", "anthropic").
Provider identifier string.
setSystemPrompt(text: string): this
Set the system prompt text.
The system prompt content.
Set the tool/function definitions available to the model.
Record<string, unknown>[]
required
Array of tool definition objects.
setUsage(usage: TokenUsage): this
Set token usage statistics for this generation.
If totalTokens is not provided it is computed as
inputTokens + outputTokens.
Token counts for input, output, and total.
setUserPrompt(text: string): this
Set the user prompt text.
Alias for FiddlerSpan.setInput — writes to gen_ai.llm.input.user.