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

2.2 KiB

██████╗  ██████╗ ██╗    ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗
██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝
██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗
██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║
╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝

class Chat (Details)

namespace: VDM\Joomla\Openai extends: Api

@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