openai2 2.0.0

OpenAi client, generated from the OpenAPI spec.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(unused_imports)]
use openai::OpenAiClient;
use openai::model::*;
#[tokio::main]
async fn main() {
    let client = OpenAiClient::from_env();
    let prompt = "your prompt";
    let response = client
        .create_image(prompt)
        .n(1)
        .response_format("your response format")
        .size("your size")
        .user("your user")
        .await
        .unwrap();
    println!("{:#?}", response);
}