IFClite TypeScript API
    Preparing search index...

    Interface TransportCall<Message>

    What a transport is asked to do. Every piece of output goes through onChunk (a non-streaming transport calls it once with the whole text): a request that never chunked is settled as having produced no output. onComplete carries the full text.

    interface TransportCall<Message> {
        maxOutputTokens: number;
        messages: readonly Message[];
        model: string;
        outputSchema?: JsonResponseSchema;
        signal: AbortSignal;
        system?: string;
        onChunk(text: string): void;
        onComplete(text: string): void;
        onError(error: Error): void;
        onFinishReason(reason: string | null): void;
        onOutputFormat?(format: OutputFormat): void;
        onTokenUsage(usage: TokenUsage): void;
    }

    Type Parameters

    • Message
    Index
    maxOutputTokens: number

    Already clamped to the route ceiling and the root budget's remainder.

    messages: readonly Message[]
    model: string
    outputSchema?: JsonResponseSchema
    signal: AbortSignal
    system?: string
    • Parameters

      • text: string

      Returns void

    • Parameters

      • text: string

      Returns void

    • Parameters

      • error: Error

      Returns void

    • Parameters

      • reason: string | null

      Returns void

    • Transport reports the format it actually places on the outgoing request.

      Parameters

      Returns void