Skip to content

Commit 767fd62

Browse files
committed
fix imports
1 parent bb81f7b commit 767fd62

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/integrations/openai_agents/test_openai_agents.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
OutputTokensDetails,
2525
)
2626

27+
import sentry_sdk
2728
from sentry_sdk import start_span
2829
from sentry_sdk.consts import SPANDATA
2930
from sentry_sdk.integrations.openai_agents import OpenAIAgentsIntegration
@@ -1056,9 +1057,6 @@ def test_openai_agents_message_role_mapping(sentry_init, capture_events):
10561057
with start_span(op="test") as span:
10571058
_set_input_data(span, get_response_kwargs)
10581059

1059-
# Verify that messages were processed and roles were mapped
1060-
from sentry_sdk.consts import SPANDATA
1061-
10621060
if SPANDATA.GEN_AI_REQUEST_MESSAGES in span._data:
10631061
stored_messages = json.loads(span._data[SPANDATA.GEN_AI_REQUEST_MESSAGES])
10641062

@@ -1207,8 +1205,6 @@ def test_openai_agents_message_truncation(sentry_init, capture_events):
12071205
get_response_kwargs = {"input": test_messages}
12081206

12091207
with start_span(op="gen_ai.chat") as span:
1210-
import sentry_sdk
1211-
12121208
scope = sentry_sdk.get_current_scope()
12131209
_set_input_data(span, get_response_kwargs)
12141210
if hasattr(scope, "_gen_ai_original_message_count"):

0 commit comments

Comments
 (0)