Skip to content

Commit 4004cbf

Browse files
fix: Update response text extraction method in OpenAI integration
1 parent 4325802 commit 4004cbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def _set_output_data(span, response, kwargs, integration, finish_span=True):
237237

238238
if hasattr(response, "choices"):
239239
if should_send_default_pii() and integration.include_prompts:
240-
response_text = [choice.message.dict() for choice in response.choices]
240+
response_text = [choice.message.model_dump() for choice in response.choices]
241241
if len(response_text) > 0:
242242
set_data_normalized(span, SPANDATA.GEN_AI_RESPONSE_TEXT, response_text)
243243

0 commit comments

Comments
 (0)