Optional
cacheOptional
callbackOptional
callbacksOptional
credentialsAWS Credentials.
If no credentials are provided, the default credentials from @aws-sdk/credential-provider-node
will be used.
Optional
endpointOverride the default endpoint hostname.
Optional
endpointOptional
fetchA custom fetch function for low-level access to AWS API. Defaults to fetch().
Optional
init: RequestInitOptional
guardrailRequired when Guardrail is in use.
Optional
guardrailIdentifier for the guardrail configuration.
Optional
guardrailVersion for the guardrail configuration.
Optional
maxThe maximum number of concurrent calls that can be made.
Defaults to Infinity
, which means no limit.
Optional
maxThe maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.
Optional
maxMax tokens.
Optional
metadataOptional
modelModel to use. For example, "amazon.titan-tg1-large", this is equivalent to the modelId property in the list-foundation-models api.
Optional
modelAdditional kwargs to pass to the model.
Optional
onCustom 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.
Optional
regionThe AWS region e.g. us-west-2
.
Fallback to AWS_DEFAULT_REGION env variable or region specified in ~/.aws/config in case it is not provided here.
Optional
stopOptional additional stop sequences to pass to the model. Currently only supported for Anthropic and AI21.
Optional
streamingWhether or not to stream responses
Optional
tagsOptional
temperatureTemperature.
Optional
traceTrace settings for the Bedrock Guardrails.
Optional
verbose
Deprecated
Use
callbacks
instead