@@ -132,6 +132,11 @@ def test_nonstreaming_chat_completion_no_prompts(
132132 response_model = "gpt-3.5-turbo" ,
133133 message_content = "the model response" ,
134134 created = 10000000 ,
135+ usage = CompletionUsage (
136+ prompt_tokens = 20 ,
137+ completion_tokens = 10 ,
138+ total_tokens = 30 ,
139+ ),
135140 )
136141 )
137142
@@ -241,6 +246,11 @@ def test_nonstreaming_chat_completion(
241246 response_model = "gpt-3.5-turbo" ,
242247 message_content = "the model response" ,
243248 created = 10000000 ,
249+ usage = CompletionUsage (
250+ prompt_tokens = 20 ,
251+ completion_tokens = 10 ,
252+ total_tokens = 30 ,
253+ ),
244254 )
245255 )
246256
@@ -332,6 +342,11 @@ async def test_nonstreaming_chat_completion_async_no_prompts(
332342 response_model = "gpt-3.5-turbo" ,
333343 message_content = "the model response" ,
334344 created = 10000000 ,
345+ usage = CompletionUsage (
346+ prompt_tokens = 20 ,
347+ completion_tokens = 10 ,
348+ total_tokens = 30 ,
349+ ),
335350 )
336351 )
337352
@@ -439,6 +454,11 @@ async def test_nonstreaming_chat_completion_async(
439454 response_model = "gpt-3.5-turbo" ,
440455 message_content = "the model response" ,
441456 created = 10000000 ,
457+ usage = CompletionUsage (
458+ prompt_tokens = 20 ,
459+ completion_tokens = 10 ,
460+ total_tokens = 30 ,
461+ ),
442462 )
443463 )
444464
@@ -1892,6 +1912,11 @@ def test_span_origin_nonstreaming_chat(
18921912 response_model = "gpt-3.5-turbo" ,
18931913 message_content = "the model response" ,
18941914 created = 10000000 ,
1915+ usage = CompletionUsage (
1916+ prompt_tokens = 20 ,
1917+ completion_tokens = 10 ,
1918+ total_tokens = 30 ,
1919+ ),
18951920 )
18961921 )
18971922
@@ -1923,6 +1948,11 @@ async def test_span_origin_nonstreaming_chat_async(
19231948 response_model = "gpt-3.5-turbo" ,
19241949 message_content = "the model response" ,
19251950 created = 10000000 ,
1951+ usage = CompletionUsage (
1952+ prompt_tokens = 20 ,
1953+ completion_tokens = 10 ,
1954+ total_tokens = 30 ,
1955+ ),
19261956 )
19271957 )
19281958
@@ -3690,6 +3720,11 @@ def test_empty_tools_in_chat_completion(
36903720 response_model = "gpt-3.5-turbo" ,
36913721 message_content = "the model response" ,
36923722 created = 10000000 ,
3723+ usage = CompletionUsage (
3724+ prompt_tokens = 20 ,
3725+ completion_tokens = 10 ,
3726+ total_tokens = 30 ,
3727+ ),
36933728 )
36943729 )
36953730
@@ -3744,6 +3779,11 @@ def test_openai_message_role_mapping(
37443779 response_model = "gpt-3.5-turbo" ,
37453780 message_content = "the model response" ,
37463781 created = 10000000 ,
3782+ usage = CompletionUsage (
3783+ prompt_tokens = 20 ,
3784+ completion_tokens = 10 ,
3785+ total_tokens = 30 ,
3786+ ),
37473787 )
37483788 )
37493789
@@ -3784,6 +3824,11 @@ def test_openai_message_truncation(
37843824 response_model = "gpt-3.5-turbo" ,
37853825 message_content = "the model response" ,
37863826 created = 10000000 ,
3827+ usage = CompletionUsage (
3828+ prompt_tokens = 20 ,
3829+ completion_tokens = 10 ,
3830+ total_tokens = 30 ,
3831+ ),
37873832 )
37883833 )
37893834
0 commit comments