smoltalk
    Preparing search index...

    Type Alias PromptConfig

    type PromptConfig = {
        abortSignal?: AbortSignal;
        budget?: Budget;
        hooks?: Partial<
            {
                onEnd: (result: PromptResult) => void;
                onError: (error: Error) => void;
                onStart: (config: PromptConfig) => void;
                onStrategyStart: (strategy: Strategy, config: SmolPromptConfig) => void;
                onToolCall: (toolCall: ToolCall) => void;
            },
        >;
        instructions?: string;
        maxMessages?: number;
        maxTokens?: number;
        messages: Message[];
        numSuggestions?: number;
        parallelToolCalls?: boolean;
        rawAttributes?: Record<string, any>;
        reasoningEffort?: "low" | "medium" | "high";
        responseFormat?: ZodType;
        responseFormatOptions?: Partial<
            {
                allowExtraKeys: boolean;
                name: string;
                numRetries: number;
                strict: boolean;
            },
        >;
        stream?: boolean;
        temperature?: number;
        thinking?: { budgetTokens?: number; enabled: boolean };
        toolLoopDetection?: ToolLoopDetection;
        tools?: { description?: string; name: string; schema: ZodType }[];
    }
    Index

    Properties

    abortSignal?: AbortSignal
    budget?: Budget
    hooks?: Partial<
        {
            onEnd: (result: PromptResult) => void;
            onError: (error: Error) => void;
            onStart: (config: PromptConfig) => void;
            onStrategyStart: (strategy: Strategy, config: SmolPromptConfig) => void;
            onToolCall: (toolCall: ToolCall) => void;
        },
    >
    instructions?: string
    maxMessages?: number
    maxTokens?: number
    messages: Message[]
    numSuggestions?: number
    parallelToolCalls?: boolean
    rawAttributes?: Record<string, any>
    reasoningEffort?: "low" | "medium" | "high"
    responseFormat?: ZodType
    responseFormatOptions?: Partial<
        {
            allowExtraKeys: boolean;
            name: string;
            numRetries: number;
            strict: boolean;
        },
    >
    stream?: boolean
    temperature?: number
    thinking?: { budgetTokens?: number; enabled: boolean }
    toolLoopDetection?: ToolLoopDetection
    tools?: { description?: string; name: string; schema: ZodType }[]