Edgewise API
    Preparing search index...

    Interface WatchOptions

    interface WatchOptions {
        allowPreview?: boolean;
        approve?: (call: ToolCall) => boolean | Promise<boolean>;
        device?: DeviceOption;
        dtype?: Dtype | Record<string, Dtype>;
        everyMs?: number;
        language?: string;
        maxSteps?: number;
        maxTokens?: number;
        model?: ModelSpec;
        onError?: (err: unknown) => void;
        onProgress?: (event: LoadEvent) => void;
        onResult: (r: { at: number; text: string }) => void;
        onSegment?: (
            segments: Segment[],
            progress: { done: number; total: number },
        ) => void;
        preset?: FlorencePreset;
        prompt: string;
        schema?: SchemaLike<unknown>;
        signal?: AbortSignal;
        stop?: string[];
        system?: string;
        temperature?: number;
        timestamps?: false | "segment" | "word";
        tools?: Record<string, AnyTool>;
        topP?: number;
    }

    Hierarchy

    • Opts
      • WatchOptions
    Index
    allowPreview?: boolean

    Allow preview and experimental models.

    approve?: (call: ToolCall) => boolean | Promise<boolean>

    Return false to decline a tool call before it runs.

    device?: DeviceOption

    Force a device. Default 'auto'.

    dtype?: Dtype | Record<string, Dtype>

    Force a dtype, such as 'q4'.

    everyMs?: number

    Minimum time between frames. Default 1500 ms.

    language?: string

    Speech models: spoken language, or 'auto'.

    maxSteps?: number

    Maximum model calls when tools are on. Default 3.

    maxTokens?: number

    Maximum new tokens per step. Default 512.

    model?: ModelSpec

    Model ID, alias, manifest, or an ordered list to try.

    onError?: (err: unknown) => void
    onProgress?: (event: LoadEvent) => void

    Receives load events while the model downloads and compiles.

    onResult: (r: { at: number; text: string }) => void
    onSegment?: (
        segments: Segment[],
        progress: { done: number; total: number },
    ) => void

    Speech models: audio over 30 s is cut at pauses and transcribed window by window. Called as each window finishes, with its segments in absolute seconds and how many windows are done, for progress bars.

    Fixed-prompt models such as Florence-2: caption, ocr, detect, or { find }.

    prompt: string
    schema?: SchemaLike<unknown>

    Fill a Zod schema. The result's object is typed from it.

    signal?: AbortSignal

    Abort download or inference.

    stop?: string[]

    Stop when the output contains one of these strings.

    system?: string
    temperature?: number

    0 (default) decodes greedily. Higher values sample.

    timestamps?: false | "segment" | "word"

    Speech models: return timestamps.

    tools?: Record<string, AnyTool>

    Tools the model may call.

    topP?: number