OpenAI API client for Rust
More information about the OpenAI API: https://beta.openai.com/docs/
```rust
use openaiapiclient::*;
async fn main() { let apikey = "............"; let model = "text-davinci-003"; let maxtokens:u32 = 3; let result = completionspretty("Is Biden president of USA? If you ask yes or not. I say:", model, maxtokens, &apikey).await; println!("result: {:?}", result); let params = Params { model: "text-davinci-003".tostring(), temperature: 0, maxtokens: 3, topp: 1.0, frequencypenalty: 0.0, presencepenalty: 0.0, stop: vec!["\"\"\"".tostring()], }; let resulthard = completions("Is Biden president of Canada? If you ask yes or not. I say:", ¶ms, &apikey).await; println!("result: {}", resulthard.unwrap().choices[0].text);
}
```