Skip to content

Commit eafdabb

Browse files
committed
feat: update unit tests
1 parent 6cd9bcc commit eafdabb

File tree

1 file changed

+12
-2
lines changed
  • aws-distro-opentelemetry-node-autoinstrumentation/test/patches/aws/services

1 file changed

+12
-2
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/test/patches/aws/services/bedrock.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,18 @@ describe('BedrockRuntime', () => {
277277

278278
describe('InvokeModel', () => {
279279
it('adds modelId to span', async () => {
280-
const dummyModelId: string = 'ABCDEFGH';
281-
const dummyBody: string = 'HGFEDCBA';
280+
const dummyModelId: string = 'amazon.titan-text-express-v1';
281+
const prompt = "Complete this text. It was the best of times it was the worst...";
282+
const nativeRequest = {
283+
inputText: prompt,
284+
textGenerationConfig: {
285+
maxTokenCount: 4096,
286+
stopSequences: [],
287+
temperature: 0,
288+
topP: 1,
289+
},
290+
};
291+
const dummyBody: string = JSON.stringify(nativeRequest);
282292

283293
nock(`https://bedrock-runtime.${region}.amazonaws.com`).post(`/model/${dummyModelId}/invoke`).reply(200, {
284294
modelId: dummyModelId,

0 commit comments

Comments
 (0)