58 lines
2.0 KiB
Markdown
58 lines
2.0 KiB
Markdown
```
|
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
|
```
|
|
# class Completions (Details)
|
|
> namespace: **VDM\Joomla\Openai**
|
|
> extends: **Api**
|
|
```uml
|
|
@startuml
|
|
class Completions #Gold {
|
|
+ create(string $model, string|array $prompt, ...) : ?object
|
|
}
|
|
|
|
note right of Completions::create
|
|
Create a completion using the OpenAI API.
|
|
API Ref: https://platform.openai.com/docs/api-reference/completions
|
|
|
|
since: 3.2.0
|
|
return: ?object
|
|
|
|
arguments:
|
|
string $model
|
|
string|array $prompt
|
|
?int $maxTokens = null
|
|
?string $suffix = null
|
|
?float $temperature = null
|
|
?float $topP = null
|
|
?int $n = null
|
|
?bool $stream = null
|
|
?int $logprobs = null
|
|
?bool $echo = null
|
|
string|null $stop = null
|
|
?float $presencePenalty = null
|
|
?float $frequencyPenalty = null
|
|
?int $bestOf = null
|
|
?array $logitBias = null
|
|
?string $user = null
|
|
end note
|
|
|
|
@enduml
|
|
```
|
|
|
|
---
|
|
```
|
|
██╗ ██████╗██████╗
|
|
██║██╔════╝██╔══██╗
|
|
██║██║ ██████╔╝
|
|
██ ██║██║ ██╔══██╗
|
|
╚█████╔╝╚██████╗██████╔╝
|
|
╚════╝ ╚═════╝╚═════╝
|
|
```
|
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
|
|