Interface WatsonxAIParams

The WatsonxAIParams interface defines the input parameters for the WatsonxAI class.

Hierarchy

Properties

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

Deprecated

Use callbacks instead

callbacks?: Callbacks
concurrency?: number

Deprecated

Use maxConcurrency instead

endpoint?: string

WatsonX AI Complete Endpoint. Can be used if you want a fully custom endpoint.

ibmCloudApiKey?: string

WatsonX AI Key. Provide API Key if you do not wish to automatically pull from env.

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.

metadata?: Record<string, unknown>
modelId?: string

WatsonX AI Model ID.

modelParameters?: Record<string, unknown>

Parameters accepted by the WatsonX AI Endpoint.

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.

projectId?: string

WatsonX AI Key. Provide API Key if you do not wish to automatically pull from env.

region?: string

IBM Cloud Compute Region. eg. us-south, us-east, etc.

tags?: string[]
verbose?: boolean
version?: string

WatsonX AI Version. Date representing the WatsonX AI Version. eg. 2023-05-29

Generated using TypeDoc