Interface ChatCompletionResult

interface ChatCompletionResult {
    content: string;
    cost?: LLMJobCost;
    finishReason: string;
    jobID: string;
    role: string;
    timeTaken: number;
    tool_calls?: ToolCall[];
    toolHistory?: ToolHistoryEntry[];
    usage: ChatTokenUsage;
    workerName?: string;
}

Properties

content: string
cost?: LLMJobCost

Actual cost of the completed request (from server settlement)

finishReason: string
jobID: string
role: string
timeTaken: number
tool_calls?: ToolCall[]

Accumulated tool calls from the model (present when finishReason is 'tool_calls').

toolHistory?: ToolHistoryEntry[]

History of tool calling rounds when autoExecuteTools was used.

workerName?: string

Name of the worker that processed this request