Skip to content

Error: Serialization error: missing field candidates at line 17 column 1 #1

@BaderBC

Description

@BaderBC

I copy paste your sample code:

use ask_gemini::Gemini;

#[tokio::main]
async fn main() {
    let gemini = Gemini::new(Some("your_api_key_here"), None);
    let prompt = "Hello, world!";

    match gemini.ask(prompt).await {
        Ok(response) => println!("Response: {:?}", response),
        Err(e) => eprintln!("Error: {}", e),
    }

into a new cargo project with just ask_gemini and tokio. It throw me that error:
Error: Serialization error: missing field `candidates` at line 17 column 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions