openai/src/c54c92da-2dd7-4136-81c9-1785f2fa0af5/README.md

64 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2023-07-04 06:26:05 +00:00
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Chat (Details)
> namespace: **VDM\Joomla\Openai**
2023-10-10 09:49:16 +00:00
> extends: **Api**
2023-07-04 06:26:05 +00:00
```uml
@startuml
class Chat #Gold {
+ create(string $model, array $messages, ...) : ?object
}
note right of Chat::create
Create a chat completion with the OpenAI API.
API Ref: https://platform.openai.com/docs/api-reference/chat/create
Each item in the array is an object with the following:
- role (string) Required
The role of the author of this message.
One of system, user, or assistant.
- content (string) Required
The contents of the message.
- name (string) Optional
The name of the author of this message.
May contain a-z, A-Z, 0-9, and underscores,
with a maximum length of 64 characters.
since: 3.2.0
return: ?object
arguments:
string $model
array $messages
?int $maxTokens = null
?float $temperature = null
?float $topP = null
?int $n = null
?bool $stream = null
mixed|null $stop = null
?float $presencePenalty = null
?float $frequencyPenalty = null
?array $logitBias = null
?string $user = null
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)