This pull requests adds CompletionBuilder and EditBuilder, which allows you to create completions and edits with the builder pattern. There are no builder structures for other structures like Embeddings and Model because they don't have very many fields. Here is an example of making a Completion with this PR:
let completion = Completion::builder()
.model(ModelID::TextDavinci003)
.prompt("Say this is a test")
.max_tokens(7)
.temperature(0.0)
.create()
.await
.unwrap()
.unwrap();
This pull requests adds
CompletionBuilder
andEditBuilder
, which allows you to create completions and edits with the builder pattern. There are no builder structures for other structures likeEmbeddings
andModel
because they don't have very many fields. Here is an example of making aCompletion
with this PR: