@@ -38,7 +38,7 @@ def test_chat_completion(exporter, openai_client):
3838 attributes .get (SpanAttributes .LLM_PATH ) == APIS ["CHAT_COMPLETION" ]["ENDPOINT" ]
3939 )
4040 assert attributes .get (SpanAttributes .LLM_RESPONSE_MODEL ) == "gpt-4-0613"
41- # assert attributes.get(SpanAttributes.LLM_PROMPTS) == json.dumps(messages_value )
41+ assert_prompt_in_events ( completion_span . events )
4242 assert attributes .get (SpanAttributes .LLM_IS_STREAMING ) is False
4343
4444 assert_token_count (attributes )
@@ -78,7 +78,7 @@ def test_chat_completion_streaming(exporter, openai_client):
7878 attributes .get (SpanAttributes .LLM_PATH ) == APIS ["CHAT_COMPLETION" ]["ENDPOINT" ]
7979 )
8080 assert attributes .get (SpanAttributes .LLM_RESPONSE_MODEL ) == "gpt-4-0613"
81- # assert attributes.get(SpanAttributes.LLM_PROMPTS) == json.dumps(messages_value )
81+ assert_prompt_in_events ( streaming_span . events )
8282 assert attributes .get (SpanAttributes .LLM_IS_STREAMING ) is True
8383
8484 events = streaming_span .events
@@ -135,7 +135,7 @@ async def test_async_chat_completion_streaming(exporter, async_openai_client):
135135 attributes .get (SpanAttributes .LLM_PATH ) == APIS ["CHAT_COMPLETION" ]["ENDPOINT" ]
136136 )
137137 assert attributes .get (SpanAttributes .LLM_RESPONSE_MODEL ) == "gpt-4-0613"
138- # assert attributes.get(SpanAttributes.LLM_PROMPTS) == json.dumps(messages_value )
138+ assert_prompt_in_events ( streaming_span . events )
139139 assert attributes .get (SpanAttributes .LLM_IS_STREAMING ) is True
140140
141141 events = streaming_span .events
0 commit comments