agent: Fix system instructions typo (#28949)

See #28793, the name of the field is actually `systemInstruction` not
`systemInstructions`.

Release Notes:

- Fixed an issue where Gemini requests would fail
This commit is contained in:
Bennet Bo Fenner 2025-04-17 10:51:05 +02:00 committed by GitHub
parent 5ebb18c47e
commit ae47829fa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -125,7 +125,7 @@ pub struct GenerateContentRequest {
#[serde(default, skip_serializing_if = "String::is_empty")]
pub model: String,
pub contents: Vec<Content>,
pub system_instructions: Option<SystemInstructions>,
pub system_instruction: Option<SystemInstruction>,
pub generation_config: Option<GenerationConfig>,
pub safety_settings: Option<Vec<SafetySetting>>,
#[serde(skip_serializing_if = "Option::is_none")]
@ -162,7 +162,7 @@ pub struct Content {
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SystemInstructions {
pub struct SystemInstruction {
pub parts: Vec<Part>,
}