Note: This is the legacy "instruct" style API. For most use cases,
use ChatCompletionsClient (client$chat$completions) instead.
The Completions API is suitable only for "gpt-3.5-turbo-instruct" and
"davinci-002". It takes a raw text prompt and returns a completion.
new()CompletionsClient$new(parent)
create()CompletionsClient$create(
prompt,
model = "gpt-3.5-turbo-instruct",
max_tokens = NULL,
temperature = NULL,
top_p = NULL,
n = NULL,
stream = NULL,
logprobs = NULL,
echo = NULL,
stop = NULL,
presence_penalty = NULL,
frequency_penalty = NULL,
best_of = NULL,
logit_bias = NULL,
user = NULL,
callback = NULL
)
clone()The objects of this class are cloneable with this method.
CompletionsClient$clone(deep = FALSE)deepWhether to make a deep clone.
Client for the OpenAI Completions API (legacy text completion endpoint).
Access via client$completions.