functai for TypeScript - v0.1.0
    Preparing search index...

    Interface CallOptions

    One call's options: settings for this call only (they beat the function's own), and a signal to cancel it.

    interface CallOptions {
        adapter?: unknown;
        apiRetries?: number;
        approve?: ApproveSetting | null;
        cacheReplies?: CacheSetting;
        caller?: Record<string, unknown> | null;
        capabilities?: Capabilities | null;
        config?: Partial<Config> | null;
        escalateBelow?: number | null;
        escalateTo?: string | object | null;
        includeFnName?: boolean;
        journal?: Journal | null;
        lm?: string | null;
        logCalls?: string | boolean | null;
        logContent?: LogContent | null;
        maxSteps?: number;
        maxTokens?: number | null;
        module?: "predict" | "cot" | null;
        observers?: readonly Observer[] | null;
        plugins?: readonly Plugin[] | null;
        programObservers?: boolean | null;
        programPlugins?: boolean | null;
        replicate?: number | null;
        retries?: number;
        router?: Router | null;
        seed?: number | null;
        signal?: AbortSignal;
        stop?: readonly string[] | null;
        temperature?: number | null;
        template?: readonly Record<string, unknown>[] | null;
        toolErrors?: "report" | "raise";
        topP?: number | null;
    }

    Hierarchy (View Summary)

    Index
    adapter?: unknown

    The layout: "xml" (default), "chat", "json", an lmcc adapter, or an artifact.

    apiRetries?: number

    Re-sends after a transient provider error (default 3).

    approve?: ApproveSetting | null

    Who answers a tool call before it runs (contract/tools.md): a function asked at once, or a rule a person answers later ("changes", "all", a list of tool names or approval paths). No approval by default.

    cacheReplies?: CacheSetting

    Answer an identical request with the reply it got before (true: in this process's memory; or a store: a Map, Redis, …). Off by default. It returns identical samples too: leave it off where you want different ones.

    caller?: Record<string, unknown> | null

    Who is calling, added to FUNCTAI_CALLER: { kind: "agent", conversation: "…" }.

    capabilities?: Capabilities | null
    config?: Partial<Config> | null

    Any other lm15 Config fields.

    escalateBelow?: number | null
    escalateTo?: string | object | null

    When the first model is less sure of its answer than escalateBelow (default 0.9), another answers instead: a model, or an AI function. The first needs to measure its confidence (a baked model, TypeSafe's Jev, config: { probabilities: "required" }).

    includeFnName?: boolean
    journal?: Journal | null

    Where each call tree's kept log is written while it runs: a store (best effort: the call never waits), or { store, mode: "required" } (the call waits until its events are kept, before its code runs, before each tool and before it returns; at most timeout ms, 30 s by default). null: none. A program's own setting cannot replace or remove a host's journal (JournalError journal-policy).

    lm?: string | null

    The model: "gpt-4.1-mini", "claude-haiku-4-5", "groq:openai/gpt-oss-120b", …

    logCalls?: string | boolean | null

    The call log: a folder, true (the default folder), or false. Unset: FUNCTAI_LOG_CALLS decides.

    logContent?: LogContent | null

    Which values the call log and the kept form of events keep: true, false (sizes, times and tokens only), or by field ({ transcript: false }; { "*": false, question: true } keeps only the question). It only ever removes: a value is written only when no layer drops it, and FUNCTAI_LOG_CONTENT=0 drops every value.

    maxSteps?: number

    Model calls per tool loop (default 8).

    maxTokens?: number | null
    module?: "predict" | "cot" | null

    "predict" (default) or "cot": reasoning before the answer.

    observers?: readonly Observer[] | null

    Receivers of the kept form of every event of the calls in scope (a page, telemetry). They add up over the layers (configure's replaces configure's: keep your own list to add one). A function is called soon after each event, off the call's own turn, from a bounded queue (an observer 10,000 events behind loses events); it still runs on this thread, so heavy work belongs in a Worker: an object with postMessage is posted each event. One that throws is warned about once and given no more events.

    plugins?: readonly Plugin[] | null

    Plugins around the calls in scope (contract/plugins.md): they add up over the layers, the program's own first, the host's last.

    programObservers?: boolean | null

    false (a host's block or configure): the observers a program sets for itself are given no event; the host's still are. It only removes: a program's own true does not undo it.

    programPlugins?: boolean | null

    false (a host's layer): the program's own plugins do not run.

    replicate?: number | null

    The n-th independent answer to the same request (default 0): part of the reply cache's key, and nothing else.

    retries?: number

    Re-asks after an unreadable reply (default 1).

    router?: Router | null

    The lm15 router calls go through (keys, base URLs, a fake for tests).

    seed?: number | null
    signal?: AbortSignal
    stop?: readonly string[] | null
    temperature?: number | null
    template?: readonly Record<string, unknown>[] | null

    A chat template of lmcc messages, instead of a named layout.

    toolErrors?: "report" | "raise"

    "report" (the model sees a tool's error) or "raise".

    topP?: number | null