use serde::{Deserialize, Serialize};
#[derive(Serialize, Debug, Clone)]
pub struct GenerateContentRequest {
pub contents: Vec<Content>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Content {
pub role: Role,
pub parts: Vec<Part>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "lowercase")]
pub enum Role {
User,
Model,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Part {
pub text: String,
}
#[derive(Deserialize, Debug)]
pub struct GenerateContentResponse {
pub candidates: Vec<Candidate>,
}
#[derive(Deserialize, Debug)]
pub struct Candidate {
pub content: Content,
}