Interface CompletionSSEInput

CompletionSSEInput represents the full potential input options for streaming completion.

interface CompletionSSEInput {
    frequencyPenalty?: number;
    inputExtension?: InputExtension;
    logitBias?: {
        [token: string]: number;
    };
    maxTokens?: number;
    model: string;
    onMessage: ((event, err) => void);
    presencePenalty?: number;
    prompt: string;
    stop?: string | string[];
    temperature?: number;
    topK?: number;
    topP?: number;
}

Properties

frequencyPenalty?: number

frequencyPenalty represents a value between -2.0 and 2.0 to penalize tokens based on frequency.

inputExtension?: InputExtension

inputExtension represents a set of optional pre-processing integrations.

logitBias?: {
    [token: string]: number;
}

logitBias modifies the likelihood of specified tokens appearing in a response.

Type declaration

  • [token: string]: number
maxTokens?: number

maxTokens represents the max number of tokens to return.

model: string

model represents the model to use.

onMessage: ((event, err) => void)

onMessage represents a function that will receive the messages.

Type declaration

presencePenalty?: number

presencePenalty represents a value between -2.0 and 2.0 to penalize tokens based on presence.

prompt: string

prompt represents the prompt to process.

stop?: string | string[]

stop represents one or more sequences where the API will stop generating tokens.

temperature?: number

temperature represents the randomness in GPT's output.

topK?: number

topK represents the variability of the generated text.

topP?: number

topP represents the diversity of the generated text.