Skip to content

Commit 08fb76f

Browse files
author
Jeel Mehta
committed
Gen-AI python implementation
1 parent f22f8b1 commit 08fb76f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/test_instrumentation_patch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def _test_patched_botocore_instrumentation(self):
290290
# BedrockRuntime - Cohere Command Models
291291
self.assertTrue("bedrock-runtime" in _KNOWN_EXTENSIONS)
292292
request_body = {
293-
"message": "Describe the purpose of a 'hello world' program in one line.",
293+
"message": "Hello, world",
294294
"max_tokens": 512,
295295
"temperature": 0.5,
296296
"p": 0.75,
@@ -309,7 +309,7 @@ def _test_patched_botocore_instrumentation(self):
309309
bedrock_runtime_attributes["gen_ai.usage.input_tokens"], math.ceil(len(request_body["message"]) / 6)
310310
)
311311
response_body = {
312-
"text": 'A "hello world" program serves as a simple introduction to programming, helping developers confirm their setup and test their coding environment.',
312+
"text": 'Goodbye, world',
313313
"finish_reason": "COMPLETE",
314314
}
315315
json_bytes = json.dumps(response_body).encode("utf-8")
@@ -412,7 +412,7 @@ def _test_patched_botocore_instrumentation(self):
412412
bedrock_runtime_success_attributes: Dict[str, str] = _do_on_success_bedrock(
413413
"bedrock-runtime", model_id="mistral", streaming_body=streaming_body
414414
)
415-
# self.assertEqual(bedrock_runtime_success_attributes["gen_ai.usage.input_tokens"], 31) Srill have concerns regarging these lines
415+
416416
self.assertEqual(
417417
bedrock_runtime_success_attributes["gen_ai.usage.output_tokens"],
418418
math.ceil(len(response_body["outputs"][0]["text"]) / 6),

0 commit comments

Comments
 (0)