use menta::{stream_text, GenerateTextRequest, StreamEvent};

fn main() {
    for event in stream_text(
        GenerateTextRequest::new()
            .model("openai/gpt-4.1-mini")
            .prompt("hello"),
    )
    .expect("stream_text failed")
    {
        match event {
            StreamEvent::TextDelta(text) => println!("text: {text}"),
            StreamEvent::Finish { reason, .. } => println!("finish: {:?}", reason),
            _ => {}
        }
    }
}
