@@ -65,7 +65,7 @@ def request_handler(request: httpx.Request) -> httpx.Response:
6565 cc_chunk .ChatCompletionChunk (
6666 id = '2' ,
6767 choices = [
68- cc_chunk .Choice (index = 1 , delta = cc_chunk .ChoiceDelta (content = ' is Nine ' , role = 'assistant' ))
68+ cc_chunk .Choice (index = 1 , delta = cc_chunk .ChoiceDelta (content = ' is secret ' , role = 'assistant' ))
6969 ],
7070 created = 1 ,
7171 model = 'gpt-4' ,
@@ -480,7 +480,7 @@ def test_sync_chat_completions_stream(instrumented_client: openai.Client, export
480480 stream = True ,
481481 )
482482 combined = '' .join (chunk .choices [0 ].delta .content for chunk in response if chunk .choices [0 ].delta .content )
483- assert combined == 'The answer is Nine '
483+ assert combined == 'The answer is secret '
484484 assert exporter .exported_spans_as_dict () == snapshot (
485485 [
486486 {
@@ -518,7 +518,7 @@ def test_sync_chat_completions_stream(instrumented_client: openai.Client, export
518518 'logfire.msg' : "streaming response from 'gpt-4' took 1.00s" ,
519519 'logfire.span_type' : 'log' ,
520520 'duration' : 1.0 ,
521- 'response_data' : '{"combined_chunk_content":"The answer is Nine ","chunk_count":2}' ,
521+ 'response_data' : '{"combined_chunk_content":"The answer is secret ","chunk_count":2}' ,
522522 'logfire.json_schema' : '{"type":"object","properties":{"request_data":{"type":"object"},"async":{},"duration":{},"response_data":{"type":"object"}}}' ,
523523 },
524524 },
@@ -539,7 +539,7 @@ async def test_async_chat_completions_stream(
539539 )
540540 chunk_content = [chunk .choices [0 ].delta .content async for chunk in response if chunk .choices [0 ].delta .content ]
541541 combined = '' .join (chunk_content )
542- assert combined == 'The answer is Nine '
542+ assert combined == 'The answer is secret '
543543 assert exporter .exported_spans_as_dict () == snapshot (
544544 [
545545 {
@@ -577,7 +577,7 @@ async def test_async_chat_completions_stream(
577577 'logfire.msg' : "streaming response from 'gpt-4' took 1.00s" ,
578578 'logfire.span_type' : 'log' ,
579579 'duration' : 1.0 ,
580- 'response_data' : '{"combined_chunk_content":"The answer is Nine ","chunk_count":2}' ,
580+ 'response_data' : '{"combined_chunk_content":"The answer is secret ","chunk_count":2}' ,
581581 'logfire.json_schema' : '{"type":"object","properties":{"request_data":{"type":"object"},"async":{},"duration":{},"response_data":{"type":"object"}}}' ,
582582 },
583583 },
0 commit comments