Interface ParallelFunctionCallOptions

Options for parallel function/tool calls.

interface ParallelFunctionCallOptions {
    prompt: string | {
        role: string;
        content: string;
    }[];
    functions: FunctionDefinition[];
    maxParallelCalls?: number;
    toolChoice?: "auto" | "required" | "none" | {
        type: "function";
        function: {
            name: string;
        };
    };
    providerId?: string;
    modelId?: string;
    temperature?: number;
    timeoutMs?: number;
}

Properties

prompt: string | {
    role: string;
    content: string;
}[]

The prompt requesting actions

functions: FunctionDefinition[]

Available functions/tools the model can call

maxParallelCalls?: number

Maximum number of parallel calls allowed

toolChoice?: "auto" | "required" | "none" | {
    type: "function";
    function: {
        name: string;
    };
}

Whether functions are required or optional

Type declaration

  • type: "function"
  • function: {
        name: string;
    }
    • name: string
providerId?: string

LLM provider to use

modelId?: string

Model ID to use

temperature?: number

Temperature for generation

timeoutMs?: number

Timeout in milliseconds