|
15 | 15 | import os |
16 | 16 | from io import BytesIO |
17 | 17 |
|
18 | | -import botocore.errorfactory |
19 | 18 | import botocore.eventstream |
20 | 19 | import botocore.exceptions |
21 | 20 | import pytest |
22 | 21 | from conftest import BOTOCORE_VERSION |
23 | | -from external_botocore._test_bedrock_chat_completion import ( |
24 | | - chat_completion_expected_events, |
25 | | - chat_completion_expected_malformed_request_body_events, |
26 | | - chat_completion_expected_malformed_response_body_events, |
27 | | - chat_completion_expected_malformed_response_streaming_body_events, |
28 | | - chat_completion_expected_malformed_response_streaming_chunk_events, |
29 | | - chat_completion_expected_streaming_error_events, |
30 | | - chat_completion_invalid_access_key_error_events, |
31 | | - chat_completion_invalid_model_error_events, |
32 | | - chat_completion_payload_templates, |
33 | | - chat_completion_streaming_expected_events, |
34 | | -) |
35 | 22 | from testing_support.fixtures import override_llm_token_callback_settings, reset_core_stats_engine, validate_attributes |
36 | 23 | from testing_support.ml_testing_utils import ( |
37 | 24 | add_token_count_to_events, |
|
54 | 41 | from newrelic.api.transaction import add_custom_attribute |
55 | 42 | from newrelic.common.object_names import callable_name |
56 | 43 | from newrelic.hooks.external_botocore import MODEL_EXTRACTORS |
| 44 | +from tests.external_botocore._test_bedrock_chat_completion_invoke_model import ( |
| 45 | + chat_completion_expected_events, |
| 46 | + chat_completion_expected_malformed_request_body_events, |
| 47 | + chat_completion_expected_malformed_response_body_events, |
| 48 | + chat_completion_expected_malformed_response_streaming_body_events, |
| 49 | + chat_completion_expected_malformed_response_streaming_chunk_events, |
| 50 | + chat_completion_expected_streaming_error_events, |
| 51 | + chat_completion_invalid_access_key_error_events, |
| 52 | + chat_completion_invalid_model_error_events, |
| 53 | + chat_completion_payload_templates, |
| 54 | + chat_completion_streaming_expected_events, |
| 55 | +) |
57 | 56 |
|
58 | 57 |
|
59 | 58 | @pytest.fixture(scope="session", params=[False, True], ids=["ResponseStandard", "ResponseStreaming"]) |
|
0 commit comments