Interface StreamObjectOptions

Options for object streaming

interface StreamObjectOptions {
    prompt: string;
    temperature?: number;
    maxTokens?: number;
    topP?: number;
    frequencyPenalty?: number;
    presencePenalty?: number;
    stop?: string | string[];
    tools?: any[];
    toolChoice?: any;
    schema: ZodType<any, ZodTypeDef, any>;
    onChunk?: ((chunk) => void);
}

Hierarchy (view full)

Properties

prompt: string
temperature?: number
maxTokens?: number
topP?: number
frequencyPenalty?: number
presencePenalty?: number
stop?: string | string[]
tools?: any[]
toolChoice?: any
schema: ZodType<any, ZodTypeDef, any>
onChunk?: ((chunk) => void)

Type declaration

    • (chunk): void
    • Parameters

      • chunk: string

      Returns void