@langchain/community
Version:
Third-party integrations for LangChain.js
29 lines (28 loc) • 1.11 kB
JavaScript
/* eslint-disable no-process-env */
import { test, expect } from "@jest/globals";
import { ChatModelUnitTests } from "@langchain/standard-tests";
import { BedrockChat } from "../bedrock/index.js";
class BedrockChatStandardUnitTests extends ChatModelUnitTests {
constructor() {
super({
Cls: BedrockChat,
chatModelHasToolCalling: true,
chatModelHasStructuredOutput: true,
constructorArgs: {
model: "anthropic.claude-3-sonnet-20240229-v1:0",
},
});
process.env.BEDROCK_AWS_SECRET_ACCESS_KEY = "test";
process.env.BEDROCK_AWS_ACCESS_KEY_ID = "test";
process.env.BEDROCK_AWS_SESSION_TOKEN = "test";
process.env.AWS_DEFAULT_REGION = "us-east-1";
}
testChatModelInitApiKey() {
this.skipTestMessage("testChatModelInitApiKey", "BedrockChat", this.multipleApiKeysRequiredMessage);
}
}
const testClass = new BedrockChatStandardUnitTests();
test("BedrockChatStandardUnitTests", () => {
const testResults = testClass.runTests();
expect(testResults).toBe(true);
});