Skip to content

Commit 801e621

Browse files
committed
remove converse_stream test
1 parent 2d594e7 commit 801e621

2 files changed

Lines changed: 0 additions & 56 deletions

File tree

contract-tests/images/applications/botocore/botocore_server.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -700,33 +700,6 @@ def _handle_bedrock_request(self) -> None:
700700
"stopSequences": ["Human:"],
701701
},
702702
)
703-
elif self.in_path("conversestream/converse-stream"):
704-
set_main_status(200)
705-
bedrock_runtime_client.meta.events.register(
706-
"before-call.bedrock-runtime.ConverseStream",
707-
lambda **kwargs: inject_200_success(
708-
stream={
709-
"contentBlockDelta": {"delta": {"text": "Hello!"}},
710-
"messageStop": {"stopReason": "end_turn"},
711-
"metadata": {"usage": {"inputTokens": 15, "outputTokens": 10}},
712-
},
713-
**kwargs,
714-
),
715-
)
716-
response = bedrock_runtime_client.converse_stream(
717-
modelId="anthropic.claude-v2:1",
718-
messages=[{"role": "user", "content": [{"text": "Hello"}]}],
719-
inferenceConfig={
720-
"maxTokens": 256,
721-
"temperature": 0.8,
722-
"topP": 0.95,
723-
"stopSequences": ["Assistant:"],
724-
},
725-
)
726-
# Consume the stream if present
727-
if "stream" in response:
728-
for event in response["stream"]:
729-
pass
730703
else:
731704
set_main_status(404)
732705

contract-tests/tests/test/amazon/botocore/botocore_test.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -693,35 +693,6 @@ def test_bedrock_runtime_converse(self):
693693
span_name="chat anthropic.claude-v2:1",
694694
)
695695

696-
def test_bedrock_runtime_converse_stream(self):
697-
self.do_test_requests(
698-
"bedrock/conversestream/converse-stream",
699-
"GET",
700-
200,
701-
0,
702-
0,
703-
rpc_service="Bedrock Runtime",
704-
remote_service="AWS::BedrockRuntime",
705-
remote_operation="ConverseStream",
706-
remote_resource_type="AWS::Bedrock::Model",
707-
remote_resource_identifier="anthropic.claude-v2:1",
708-
cloudformation_primary_identifier="anthropic.claude-v2:1",
709-
request_specific_attributes={
710-
_GEN_AI_REQUEST_MODEL: "anthropic.claude-v2:1",
711-
_GEN_AI_SYSTEM: "aws.bedrock",
712-
_GEN_AI_REQUEST_MAX_TOKENS: 256,
713-
_GEN_AI_REQUEST_TEMPERATURE: 0.8,
714-
_GEN_AI_REQUEST_TOP_P: 0.95,
715-
_GEN_AI_REQUEST_STOP_SEQUENCES: ["Assistant:"],
716-
},
717-
response_specific_attributes={
718-
_GEN_AI_RESPONSE_FINISH_REASONS: ["end_turn"],
719-
_GEN_AI_USAGE_INPUT_TOKENS: 15,
720-
_GEN_AI_USAGE_OUTPUT_TOKENS: 10,
721-
},
722-
span_name="chat anthropic.claude-v2:1",
723-
)
724-
725696
def test_bedrock_get_guardrail(self):
726697
self.do_test_requests(
727698
"bedrock/getguardrail/get-guardrail",

0 commit comments

Comments
 (0)