Skip to content

Commit 48b623d

Browse files
Merge branch 'webb/openai-separate-input-handling' into webb/openai-responses-system-instruction
2 parents 5ced480 + fee4553 commit 48b623d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

sentry_sdk/integrations/openai.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,11 @@ def _set_completions_api_input_data(
401401
"messages"
402402
)
403403

404-
if not should_send_default_pii() or not integration.include_prompts:
405-
set_data_normalized(span, SPANDATA.GEN_AI_OPERATION_NAME, "responses")
406-
_commmon_set_input_data(span, kwargs)
407-
return
408-
409-
if messages is None:
404+
if (
405+
not should_send_default_pii()
406+
or not integration.include_prompts
407+
or messages is None
408+
):
410409
set_data_normalized(span, SPANDATA.GEN_AI_OPERATION_NAME, "chat")
411410
_commmon_set_input_data(span, kwargs)
412411
return

0 commit comments

Comments
 (0)