assistant: Fix Gemini 1.5 Pro throwing "missing field 'index' at line N column M" (#20200)
Closes https://github.com/zed-industries/zed/issues/20033 - Fixed deserialization error of `GenerateContentCandidate` where `index` is unexpectedly nil
This commit is contained in:
parent
2c7e71028d
commit
966b18e142
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ pub struct GenerateContentResponse {
|
|||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GenerateContentCandidate {
|
||||
pub index: usize,
|
||||
pub index: Option<usize>,
|
||||
pub content: Content,
|
||||
pub finish_reason: Option<String>,
|
||||
pub finish_message: Option<String>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue