interface BedrockChatFields {
    credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
    endpointHost?: string;
    endpointUrl?: string;
    fetchFn?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
    guardrailConfig?: {
        streamProcessingMode: "SYNCHRONOUS" | "ASYNCHRONOUS";
        tagSuffix: string;
    };
    guardrailIdentifier?: string;
    guardrailVersion?: string;
    maxTokens?: number;
    model?: string;
    modelKwargs?: Record<string, unknown>;
    region?: string;
    stopSequences?: string[];
    streaming?: boolean;
    temperature?: number;
    trace?: "ENABLED" | "DISABLED";
}

Hierarchy (view full)

  • Partial<BaseBedrockInput>
  • Toolkit
    • BedrockChatFields

Properties

credentials?: AwsCredentialIdentity | Provider<AwsCredentialIdentity>

AWS Credentials. If no credentials are provided, the default credentials from @aws-sdk/credential-provider-node will be used.

endpointHost?: string

Override the default endpoint hostname.

endpointUrl?: string

⚠️ Deprecated ⚠️

Use endpointHost instead Override the default endpoint url.

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

It is not recommended for use.

fetchFn?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

A custom fetch function for low-level access to AWS API. Defaults to fetch().

Type declaration

    • (input, init?): Promise<Response>
    • A custom fetch function for low-level access to AWS API. Defaults to fetch().

      Parameters

      • input: string | URL | Request
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • A custom fetch function for low-level access to AWS API. Defaults to fetch().

      Parameters

      • input: RequestInfo
      • Optional init: RequestInit

      Returns Promise<Response>

guardrailConfig?: {
    streamProcessingMode: "SYNCHRONOUS" | "ASYNCHRONOUS";
    tagSuffix: string;
}

Required when Guardrail is in use.

Type declaration

  • streamProcessingMode: "SYNCHRONOUS" | "ASYNCHRONOUS"
  • tagSuffix: string
guardrailIdentifier?: string

Identifier for the guardrail configuration.

guardrailVersion?: string

Version for the guardrail configuration.

maxTokens?: number

Max tokens.

model?: string

Model to use. For example, "amazon.titan-tg1-large", this is equivalent to the modelId property in the list-foundation-models api.

modelKwargs?: Record<string, unknown>

Additional kwargs to pass to the model.

region?: string

The 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.

stopSequences?: string[]

Optional additional stop sequences to pass to the model. Currently only supported for Anthropic and AI21.

Deprecated

Use .bind({ "stop": [...] }) instead

streaming?: boolean

Whether or not to stream responses

temperature?: number

Temperature.

trace?: "ENABLED" | "DISABLED"

Trace settings for the Bedrock Guardrails.

Generated using TypeDoc