Chatoyant - v0.9.0
    Preparing search index...

    Interface ToolOptions

    Options for tool execution.

    interface ToolOptions {
        maxIterations?: number;
        toolTimeout?: number;
        onToolError?: "respond" | "throw";
        onToolCallStart?: (calls: ToolCall[]) => void;
        onToolCallComplete?: (results: ToolResult[]) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    maxIterations?: number

    Maximum tool call iterations before stopping.

    5
    
    toolTimeout?: number

    Timeout for each tool execution in milliseconds.

    10000
    
    onToolError?: "respond" | "throw"

    How to handle tool execution errors.

    • 'respond': Send error back to model (default)
    • 'throw': Throw immediately
    'respond'
    
    onToolCallStart?: (calls: ToolCall[]) => void

    Callback fired when the model issues tool calls, before execution begins. Useful for showing tool activity indicators in UIs.

    onToolCallComplete?: (results: ToolResult[]) => void

    Callback fired after all tool calls in an iteration have been executed. Receives the results (including success/failure status) for each call.