Integration with AWS Bedrock Converse API.

import { ChatBedrockConverse } from "@langchain/aws";

const model = new ChatBedrockConverse({
region: process.env.BEDROCK_AWS_REGION ?? "us-east-1",
credentials: {
secretAccessKey: process.env.BEDROCK_AWS_SECRET_ACCESS_KEY!,
accessKeyId: process.env.BEDROCK_AWS_ACCESS_KEY_ID!,
},
});

const res = await model.invoke([new HumanMessage("Print hello world")]);

Hierarchy (view full)

Implements

Constructors

Methods

  • Parameters

    • tools: any[]
    • Optionalkwargs: Partial<unknown>

    Returns Runnable<BaseLanguageModelInput, AIMessageChunk, this["ParsedCallOptions"]>