gptrust_api

Crates.iogptrust_api
lib.rsgptrust_api
version0.1.4
sourcesrc
created_at2023-01-29 16:27:22.929759
updated_at2023-05-09 20:50:24.475775
descriptionRust binding of OpenAI/GPT-3 API
homepage
repositoryhttps://github.com/gptrust/gptrust
max_upload_size
id771087
size14,806
(kousiknandy)

documentation

README

gptrust_api

gptrust_api is a library that can used to interact with OpenAI API endpoints. It is unofficial and community maintained library, MIT Licensed.

Often it simplifies the API call by supplying sensible defaults. However if adjusting all parameters are needed, please file an issue or submit a PR with a elaborate version of the call.

Code example:

let completions = gptrust_api::completions::complete(
            "Once upon a time, ".to_string(),
            "text-davinci-001".to_string(),
            100,
            )
            .await
            .expect("Couldn't complete the prompt");
 let names = completions
            .iter()
            .map(|x| x.text.clone())
            .collect::<Vec<String>>();
Commit count: 153

cargo fmt