NAME
OpenAPI::Client::OpenAI::Path::completions - Documentation for the /completions path.
DESCRIPTION
This document describes the API endpoint at /completions
.
See the examples/
directory in the distribution for examples of how to use this.
POST /completions
Creates a completion for the provided prompt and parameters.
Operation ID
createCompletion
$client->createCompletion( ... );
Request Body
Content Type: application/json
Example:
{
"user" : "user-1234",
"temperature" : 1,
"n" : 1,
"top_p" : 1,
"suffix" : "test.",
"stream_options" : null,
"max_tokens" : 16
}
Responses
Status Code: 200
OK
Content Types:
application/json
Example:
{ "usage" : { "prompt_tokens_details" : null, "completion_tokens_details" : null }, "choices" : [ { "logprobs" : { "token_logprobs" : [ null ], "tokens" : [ null ], "top_logprobs" : [ null ], "text_offset" : [ null ] } } ] }
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2025 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.