use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use menta::{GenerateTextRequest, generate_text};

#[derive(Debug, Deserialize, Serialize, JsonSchema)]
struct Status {
    topic: String,
    status: String,
}

#[tokio::main]
async fn main() {
    let result = generate_text(
        GenerateTextRequest::<Status>::typed()
            .model("openai/gpt-4.1-mini")
            .prompt("Return JSON with fields topic and status"),
    )
    .await
    .expect("generate_text failed");

    println!("{:?}", result.output);
}
