File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
rig-integrations/rig-gemini-grpc/src Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -302,9 +302,11 @@ fn rig_assistant_content_to_grpc_part(
302302 } )
303303 }
304304 message:: AssistantContent :: Reasoning ( reasoning) => Ok ( proto:: Part {
305- data : Some ( proto:: part:: Data :: Text ( reasoning. reasoning . join ( " \n " ) ) ) ,
305+ data : Some ( proto:: part:: Data :: Text ( reasoning. display_text ( ) ) ) ,
306306 thought : true ,
307- thought_signature : decode_optional_base64 ( reasoning. signature ) ?,
307+ thought_signature : decode_optional_base64 (
308+ reasoning. first_signature ( ) . map ( |s| s. to_string ( ) ) ,
309+ ) ?,
308310 part_metadata : None ,
309311 } ) ,
310312 _ => Err ( CompletionError :: RequestError (
@@ -335,10 +337,10 @@ impl TryFrom<GenerateContentResponse> for completion::CompletionResponse<Generat
335337 let assistant_content = match & part. data {
336338 Some ( proto:: part:: Data :: Text ( text) ) => {
337339 if part. thought {
338- completion:: AssistantContent :: Reasoning (
339- Reasoning :: new ( text)
340- . with_signature ( encode_optional_base64 ( & part. thought_signature ) ) ,
341- )
340+ completion:: AssistantContent :: Reasoning ( Reasoning :: new_with_signature (
341+ text,
342+ encode_optional_base64 ( & part. thought_signature ) ,
343+ ) )
342344 } else {
343345 completion:: AssistantContent :: text ( text)
344346 }
@@ -418,6 +420,7 @@ impl TryFrom<GenerateContentResponse> for completion::CompletionResponse<Generat
418420 choice,
419421 usage,
420422 raw_response : response,
423+ message_id : None ,
421424 } )
422425 }
423426}
You can’t perform that action at this time.
0 commit comments