@@ -68,8 +68,8 @@ def test_nonstreaming_chat_completion(
68
68
assert span ["op" ] == "ai.chat_completions.create.openai"
69
69
70
70
if send_default_pii and include_prompts :
71
- assert "hello" in span ["data" ]["ai.input_messages" ][0 ][ "content" ]
72
- assert "the model response" in span ["data" ]["ai.responses" ][0 ][ "content" ]
71
+ assert "hello" in span ["data" ]["ai.input_messages" ]["content" ]
72
+ assert "the model response" in span ["data" ]["ai.responses" ]["content" ]
73
73
else :
74
74
assert "ai.input_messages" not in span ["data" ]
75
75
assert "ai.responses" not in span ["data" ]
@@ -147,8 +147,8 @@ def test_streaming_chat_completion(
147
147
assert span ["op" ] == "ai.chat_completions.create.openai"
148
148
149
149
if send_default_pii and include_prompts :
150
- assert "hello" in span ["data" ]["ai.input_messages" ][0 ][ "content" ]
151
- assert "hello world" in span ["data" ]["ai.responses" ][ 0 ]
150
+ assert "hello" in span ["data" ]["ai.input_messages" ]["content" ]
151
+ assert "hello world" in span ["data" ]["ai.responses" ]
152
152
else :
153
153
assert "ai.input_messages" not in span ["data" ]
154
154
assert "ai.responses" not in span ["data" ]
@@ -219,7 +219,7 @@ def test_embeddings_create(
219
219
span = tx ["spans" ][0 ]
220
220
assert span ["op" ] == "ai.embeddings.create.openai"
221
221
if send_default_pii and include_prompts :
222
- assert "hello" in span ["data" ]["ai.input_messages" ][ 0 ]
222
+ assert "hello" in span ["data" ]["ai.input_messages" ]
223
223
else :
224
224
assert "ai.input_messages" not in span ["data" ]
225
225
0 commit comments