interface BedrockChatFields {
    durationSeconds: undefined | number;
    policy: undefined | string;
    policyArns: undefined | {}[];
    providerId: undefined | string;
    roleArn: undefined | string;
    credentials?: CredentialType;
    endpointHost?: string;
    endpointUrl?: string;
    fetchFn?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: RequestInfo, init?: RequestInit): 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
  • Partial<DefaultProviderInit>
    • BedrockChatFields

Properties

durationSeconds: undefined | number
policy: undefined | string
policyArns: undefined | {}[]
providerId: undefined | string
roleArn: undefined | string
credentials?: CredentialType

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

Use endpointHost instead Override the default endpoint url.

fetchFn?: {
    (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    (input: RequestInfo, init?: RequestInit): Promise<Response>;
}

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

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

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

Required when Guardrail is in use.

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.

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

streaming?: boolean

Whether or not to stream responses

temperature?: number

Temperature.

trace?: "ENABLED" | "DISABLED"

Trace settings for the Bedrock Guardrails.