Skip to content

Commit

Permalink
fix: aws region error
Browse files Browse the repository at this point in the history
  • Loading branch information
nirga committed Feb 13, 2024
1 parent a04722d commit 5c36343
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
9 changes: 8 additions & 1 deletion packages/instrumentation-bedrock/tests/ai21.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ describe("Test Ai21 with AWS Bedrock Instrumentation", () => {
instrumentation.setTracerProvider(provider);
bedrock = await import("@aws-sdk/client-bedrock-runtime");

bedrockRuntimeClient = new bedrock.BedrockRuntimeClient();
bedrockRuntimeClient = new bedrock.BedrockRuntimeClient(
process.env.RECORD_MODE !== "NEW"
? {
region: "us-west-2",
credentials: { accessKeyId: "test", secretAccessKey: "test" },
}
: {},
);
});

beforeEach(function () {
Expand Down
9 changes: 8 additions & 1 deletion packages/instrumentation-bedrock/tests/amazon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ describe("Test Amazon Titan with AWS Bedrock Instrumentation", () => {
instrumentation.setTracerProvider(provider);
bedrock = await import("@aws-sdk/client-bedrock-runtime");

bedrockRuntimeClient = new bedrock.BedrockRuntimeClient();
bedrockRuntimeClient = new bedrock.BedrockRuntimeClient(
process.env.RECORD_MODE !== "NEW"
? {
region: "us-west-2",
credentials: { accessKeyId: "test", secretAccessKey: "test" },
}
: {},
);
});

beforeEach(function () {
Expand Down
9 changes: 8 additions & 1 deletion packages/instrumentation-bedrock/tests/anthropic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ describe("Test Anthropic with AWS Bedrock Instrumentation", () => {
instrumentation.setTracerProvider(provider);
bedrock = await import("@aws-sdk/client-bedrock-runtime");

bedrockRuntimeClient = new bedrock.BedrockRuntimeClient();
bedrockRuntimeClient = new bedrock.BedrockRuntimeClient(
process.env.RECORD_MODE !== "NEW"
? {
region: "us-west-2",
credentials: { accessKeyId: "test", secretAccessKey: "test" },
}
: {},
);
});

beforeEach(function () {
Expand Down
9 changes: 8 additions & 1 deletion packages/instrumentation-bedrock/tests/cohere.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ describe("Test Cohere with AWS Bedrock Instrumentation", () => {
instrumentation.setTracerProvider(provider);
bedrock = await import("@aws-sdk/client-bedrock-runtime");

bedrockRuntimeClient = new bedrock.BedrockRuntimeClient();
bedrockRuntimeClient = new bedrock.BedrockRuntimeClient(
process.env.RECORD_MODE !== "NEW"
? {
region: "us-west-2",
credentials: { accessKeyId: "test", secretAccessKey: "test" },
}
: {},
);
});

beforeEach(function () {
Expand Down
9 changes: 8 additions & 1 deletion packages/instrumentation-bedrock/tests/meta.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ describe("Test Meta with AWS Bedrock Instrumentation", () => {
instrumentation.setTracerProvider(provider);
bedrock = await import("@aws-sdk/client-bedrock-runtime");

bedrockRuntimeClient = new bedrock.BedrockRuntimeClient();
bedrockRuntimeClient = new bedrock.BedrockRuntimeClient(
process.env.RECORD_MODE !== "NEW"
? {
region: "us-west-2",
credentials: { accessKeyId: "test", secretAccessKey: "test" },
}
: {},
);
});

beforeEach(function () {
Expand Down

0 comments on commit 5c36343

Please sign in to comment.