feat: add SSE streaming, thinking models, and modernized Part struct
Some checks failed
Rust / build (push) Has been cancelled

This commit is contained in:
2026-09-20 16:42:55 +01:00
parent ad82fc712b
commit 494aab6d14
18 changed files with 703 additions and 696 deletions

View File

@@ -1,9 +1,8 @@
use std::{error::Error, io::Cursor};
use gemini_rs::prelude::{
GeminiClient, PersonGeneration, PredictImageRequest, PredictImageRequestParameters,
GeminiClient, PredictImageRequest, PredictImageRequestParameters,
PredictImageRequestParametersOutputOptions, PredictImageRequestPrompt,
PredictImageSafetySetting,
};
use image::{ImageFormat, ImageReader};
@@ -35,8 +34,8 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
mime_type: Some("image/jpeg".to_string()),
compression_quality: Some(75),
}),
person_generation: Some(PersonGeneration::AllowAll),
safety_setting: Some(PredictImageSafetySetting::BlockOnlyHigh),
person_generation: Some("allow_all".to_string()),
safety_setting: Some("block_only_high".to_string()),
..Default::default()
},
};