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
18
#![allow(unused_imports)]
use openai::OpenAiClient;
use openai::model::*;
#[tokio::main]
async fn main() {
    let client = OpenAiClient::from_env();
    let instruction = "your instruction";
    let model = "your model";
    let response = client
        .create_edit(instruction, model)
        .input("your input")
        .n(1)
        .temperature(1.0)
        .top_p(1.0)
        .await
        .unwrap();
    println!("{:#?}", response);
}