Interface for AI21 input parameters.

Hierarchy

Implemented by

Properties

ai21ApiKey?: string
baseUrl?: string
cache?: boolean | BaseCache<Generation[]>
callbackManager?: CallbackManager

⚠️ Deprecated ⚠️

Use callbacks instead

This feature is deprecated and will be removed in the future.

It is not recommended for use.

callbacks?: Callbacks
concurrency?: number

Deprecated

Use maxConcurrency instead

countPenalty?: AI21PenaltyData
frequencyPenalty?: AI21PenaltyData
logitBias?: Record<string, number>
maxConcurrency?: number

The maximum number of concurrent calls that can be made. Defaults to Infinity, which means no limit.

maxRetries?: number

The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.

maxTokens?: number
metadata?: Record<string, unknown>
minTokens?: number
model?: string
numResults?: number
onFailedAttempt?: FailedAttemptHandler

Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.

presencePenalty?: AI21PenaltyData
stop?: string[]
tags?: string[]
temperature?: number
topP?: number
verbose?: boolean

Generated using TypeDoc