@@ -128,7 +128,7 @@ impl LogprobExtractor for NvCreateChatCompletionStreamResponse {
128128 fn extract_logprobs_by_choice ( & self ) -> HashMap < u32 , Vec < TokenLogProbs > > {
129129 let mut result = HashMap :: new ( ) ;
130130
131- for choice in & self . inner . choices {
131+ for choice in & self . choices {
132132 let choice_index = choice. index ;
133133
134134 let choice_logprobs = choice
@@ -574,8 +574,7 @@ mod tests {
574574 use approx:: assert_abs_diff_eq;
575575 use dynamo_async_openai:: types:: {
576576 ChatChoiceLogprobs , ChatChoiceStream , ChatCompletionStreamResponseDelta ,
577- ChatCompletionTokenLogprob , CreateChatCompletionStreamResponse , FinishReason , Role ,
578- TopLogprobs ,
577+ ChatCompletionTokenLogprob , FinishReason , Role , TopLogprobs ,
579578 } ;
580579 use futures:: StreamExt ;
581580 use std:: sync:: Arc ;
@@ -949,7 +948,7 @@ mod tests {
949948 token_logprobs : Vec < ChatCompletionTokenLogprob > ,
950949 ) -> NvCreateChatCompletionStreamResponse {
951950 #[ expect( deprecated) ]
952- let inner = CreateChatCompletionStreamResponse {
951+ NvCreateChatCompletionStreamResponse {
953952 id : "test_id" . to_string ( ) ,
954953 choices : vec ! [ ChatChoiceStream {
955954 index: 0 ,
@@ -959,6 +958,7 @@ mod tests {
959958 tool_calls: None ,
960959 role: Some ( Role :: Assistant ) ,
961960 refusal: None ,
961+ reasoning_content: None ,
962962 } ,
963963 finish_reason: Some ( FinishReason :: Stop ) ,
964964 logprobs: Some ( ChatChoiceLogprobs {
@@ -972,9 +972,7 @@ mod tests {
972972 system_fingerprint : None ,
973973 object : "chat.completion.chunk" . to_string ( ) ,
974974 usage : None ,
975- } ;
976-
977- NvCreateChatCompletionStreamResponse { inner }
975+ }
978976 }
979977
980978 fn create_mock_response_with_multiple_choices (
@@ -992,6 +990,7 @@ mod tests {
992990 tool_calls : None ,
993991 role : Some ( Role :: Assistant ) ,
994992 refusal : None ,
993+ reasoning_content : None ,
995994 } ,
996995 finish_reason : Some ( FinishReason :: Stop ) ,
997996 logprobs : Some ( ChatChoiceLogprobs {
@@ -1001,7 +1000,7 @@ mod tests {
10011000 } )
10021001 . collect ( ) ;
10031002
1004- let inner = CreateChatCompletionStreamResponse {
1003+ NvCreateChatCompletionStreamResponse {
10051004 id : "test_id" . to_string ( ) ,
10061005 choices,
10071006 created : 1234567890 ,
@@ -1010,9 +1009,7 @@ mod tests {
10101009 system_fingerprint : None ,
10111010 object : "chat.completion.chunk" . to_string ( ) ,
10121011 usage : None ,
1013- } ;
1014-
1015- NvCreateChatCompletionStreamResponse { inner }
1012+ }
10161013 }
10171014
10181015 #[ test]
@@ -1331,7 +1328,7 @@ mod tests {
13311328 fn test_logprob_extractor_with_missing_data ( ) {
13321329 // Test with choice that has no logprobs
13331330 #[ expect( deprecated) ]
1334- let inner = CreateChatCompletionStreamResponse {
1331+ let response = NvCreateChatCompletionStreamResponse {
13351332 id : "test_id" . to_string ( ) ,
13361333 choices : vec ! [ ChatChoiceStream {
13371334 index: 0 ,
@@ -1341,6 +1338,7 @@ mod tests {
13411338 tool_calls: None ,
13421339 role: Some ( Role :: Assistant ) ,
13431340 refusal: None ,
1341+ reasoning_content: None ,
13441342 } ,
13451343 finish_reason: Some ( FinishReason :: Stop ) ,
13461344 logprobs: None , // No logprobs
@@ -1353,7 +1351,6 @@ mod tests {
13531351 usage : None ,
13541352 } ;
13551353
1356- let response = NvCreateChatCompletionStreamResponse { inner } ;
13571354 let logprobs = response. extract_logprobs_by_choice ( ) ;
13581355 assert_eq ! ( logprobs. len( ) , 1 ) ;
13591356 assert ! ( logprobs. values( ) . any( |v| v. is_empty( ) ) ) ;
@@ -1556,9 +1553,8 @@ mod tests {
15561553 fn create_mock_response ( ) -> NvCreateChatCompletionStreamResponse {
15571554 // Create a mock response for testing
15581555 // In practice, this would have real logprobs data
1559- use dynamo_async_openai:: types:: CreateChatCompletionStreamResponse ;
15601556
1561- let inner = CreateChatCompletionStreamResponse {
1557+ NvCreateChatCompletionStreamResponse {
15621558 id : "test_id" . to_string ( ) ,
15631559 choices : vec ! [ ] ,
15641560 created : 1234567890 ,
@@ -1567,9 +1563,7 @@ mod tests {
15671563 system_fingerprint : None ,
15681564 object : "chat.completion.chunk" . to_string ( ) ,
15691565 usage : None ,
1570- } ;
1571-
1572- NvCreateChatCompletionStreamResponse { inner }
1566+ }
15731567 }
15741568
15751569 // Mock context for testing
0 commit comments