18
18
19
19
20
20
def test_nonstreaming_chat_completion (sentry_init , capture_events ):
21
- sentry_init (integrations = [OpenAIIntegration ()], traces_sample_rate = 1.0 )
21
+ sentry_init (
22
+ integrations = [OpenAIIntegration (include_prompts = True )], traces_sample_rate = 1.0
23
+ )
22
24
events = capture_events ()
23
25
24
26
client = OpenAI (api_key = "z" )
@@ -64,7 +66,9 @@ def test_nonstreaming_chat_completion(sentry_init, capture_events):
64
66
65
67
# noinspection PyTypeChecker
66
68
def test_streaming_chat_completion (sentry_init , capture_events ):
67
- sentry_init (integrations = [OpenAIIntegration ()], traces_sample_rate = 1.0 )
69
+ sentry_init (
70
+ integrations = [OpenAIIntegration (include_prompts = True )], traces_sample_rate = 1.0
71
+ )
68
72
events = capture_events ()
69
73
70
74
client = OpenAI (api_key = "z" )
@@ -130,7 +134,9 @@ def test_streaming_chat_completion(sentry_init, capture_events):
130
134
131
135
132
136
def test_bad_chat_completion (sentry_init , capture_events ):
133
- sentry_init (integrations = [OpenAIIntegration ()], traces_sample_rate = 1.0 )
137
+ sentry_init (
138
+ integrations = [OpenAIIntegration (include_prompts = True )], traces_sample_rate = 1.0
139
+ )
134
140
events = capture_events ()
135
141
136
142
client = OpenAI (api_key = "z" )
@@ -147,7 +153,9 @@ def test_bad_chat_completion(sentry_init, capture_events):
147
153
148
154
149
155
def test_embeddings_create (sentry_init , capture_events ):
150
- sentry_init (integrations = [OpenAIIntegration ()], traces_sample_rate = 1.0 )
156
+ sentry_init (
157
+ integrations = [OpenAIIntegration (include_prompts = True )], traces_sample_rate = 1.0
158
+ )
151
159
events = capture_events ()
152
160
153
161
client = OpenAI (api_key = "z" )
0 commit comments