Skip to content

Commit fe91c10

Browse files
committed
fix: fix Gemini LLM types
1 parent 1e6ae8d commit fe91c10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

anda_engine/src/model/gemini/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ pub struct Content {
145145
#[serde(skip_serializing_if = "Option::is_none")]
146146
pub role: Option<Role>,
147147

148+
#[serde(default)]
148149
pub parts: Vec<Part>,
149150
}
150151

@@ -218,6 +219,7 @@ impl From<ContentPart> for Part {
218219
id: call_id,
219220
will_continue: None,
220221
scheduling: None,
222+
parts: None,
221223
},
222224
..Default::default()
223225
},
@@ -305,6 +307,8 @@ pub enum PartKind {
305307
will_continue: Option<bool>,
306308
#[serde(skip_serializing_if = "Option::is_none")]
307309
scheduling: Option<String>,
310+
#[serde(skip_serializing_if = "Option::is_none")]
311+
parts: Option<Vec<Part>>,
308312
},
309313
InlineData {
310314
mime_type: String,
@@ -850,6 +854,7 @@ mod tests {
850854
id: Some("call_123".to_string()),
851855
will_continue: Some(false),
852856
scheduling: None,
857+
parts: None,
853858
},
854859
};
855860
let json_value = serde_json::to_value(&function_response_part).unwrap();

0 commit comments

Comments
 (0)