openai/README.md

233 lines
13 KiB
Markdown
Raw Normal View History

2023-05-20 21:36:58 +00:00
```
███████╗██╗ ██╗██████╗ ███████╗██████╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗
███████╗██║ ██║██████╔╝█████╗ ██████╔╝
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗
███████║╚██████╔╝██║ ███████╗██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ███████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝███████╗
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗╚════██║
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║███████║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝╚══════╝
```
### What is JCB Super Powers?
The Joomla Component Builder (JCB) Super Power features are designed to enhance JCB's functionality and streamline the development process. These Super Powers enable developers to efficiently manage and share their custom powers across multiple JCB instances through repositories hosted on [https://git.vdm.dev/[username]/[repository-name]](https://git.vdm.dev). JCB Super Powers are managed using a combination of layers, events, tasks, methods, switches, and algorithms, which work together to provide powerful customization and extensibility options. More details on JCB Super Powers can be found in the [Super Powers Documentation](https://git.vdm.dev/joomla/super-powers/wiki).
In summary, JCB Super Powers offer a flexible and efficient way to manage and share functionalities between JCB instances. By utilizing a sophisticated system of layers, events, tasks, methods, switches, and algorithms, developers can seamlessly integrate JCB core powers and their custom powers. For more information on how to work with JCB Super Powers, refer to the [Super Powers User Guide](https://git.vdm.dev/joomla/super-powers/wiki).
### What can I find here?
This repository contains an index (see below) of all the approved powers within the JCB GUI. During the compilation of a component, these powers are automatically added to the repository, ensuring a well-organized and accessible collection of functionalities.
# Index of powers
- **Namespace**: [VDM\Joomla\Openai](#vdm-joomla-openai)
- **abstract class Factory** | [Details](src/d78bee89-6f7e-42b6-917e-17f05b238490) | [Code](src/d78bee89-6f7e-42b6-917e-17f05b238490/code.php) | [Settings](src/d78bee89-6f7e-42b6-917e-17f05b238490/settings.json) | Super__d78bee89_6f7e_42b6_917e_17f05b238490__Power
- **class Audio** | [Details](src/d76b2e22-c8dd-44b1-86b5-822768b317a3) | [Code](src/d76b2e22-c8dd-44b1-86b5-822768b317a3/code.php) | [Settings](src/d76b2e22-c8dd-44b1-86b5-822768b317a3/settings.json) | Super__d76b2e22_c8dd_44b1_86b5_822768b317a3__Power
- **class Chat** | [Details](src/c54c92da-2dd7-4136-81c9-1785f2fa0af5) | [Code](src/c54c92da-2dd7-4136-81c9-1785f2fa0af5/code.php) | [Settings](src/c54c92da-2dd7-4136-81c9-1785f2fa0af5/settings.json) | Super__c54c92da_2dd7_4136_81c9_1785f2fa0af5__Power
- **class Completions** | [Details](src/796cca70-2577-4f8f-9a05-ac37db1f2f02) | [Code](src/796cca70-2577-4f8f-9a05-ac37db1f2f02/code.php) | [Settings](src/796cca70-2577-4f8f-9a05-ac37db1f2f02/settings.json) | Super__796cca70_2577_4f8f_9a05_ac37db1f2f02__Power
- **class Edits** | [Details](src/98e59bdf-81a2-41ef-a3a6-6a88a7cc53c8) | [Code](src/98e59bdf-81a2-41ef-a3a6-6a88a7cc53c8/code.php) | [Settings](src/98e59bdf-81a2-41ef-a3a6-6a88a7cc53c8/settings.json) | Super__98e59bdf_81a2_41ef_a3a6_6a88a7cc53c8__Power
- **class Embeddings** | [Details](src/df141f03-393f-4fa3-a568-8b65f7358b02) | [Code](src/df141f03-393f-4fa3-a568-8b65f7358b02/code.php) | [Settings](src/df141f03-393f-4fa3-a568-8b65f7358b02/settings.json) | Super__df141f03_393f_4fa3_a568_8b65f7358b02__Power
- **class Files** | [Details](src/65dd022b-8f3a-46be-8930-0cae74b9834b) | [Code](src/65dd022b-8f3a-46be-8930-0cae74b9834b/code.php) | [Settings](src/65dd022b-8f3a-46be-8930-0cae74b9834b/settings.json) | Super__65dd022b_8f3a_46be_8930_0cae74b9834b__Power
- **class FineTunes** | [Details](src/0e61da13-6429-426d-a6f9-f5723cd3b7b1) | [Code](src/0e61da13-6429-426d-a6f9-f5723cd3b7b1/code.php) | [Settings](src/0e61da13-6429-426d-a6f9-f5723cd3b7b1/settings.json) | Super__0e61da13_6429_426d_a6f9_f5723cd3b7b1__Power
- **class Images** | [Details](src/bb8973c1-261f-4b55-8f9b-9ee98843fced) | [Code](src/bb8973c1-261f-4b55-8f9b-9ee98843fced/code.php) | [Settings](src/bb8973c1-261f-4b55-8f9b-9ee98843fced/settings.json) | Super__bb8973c1_261f_4b55_8f9b_9ee98843fced__Power
- **class Models** | [Details](src/08abd2df-1406-4939-a1a6-94d2fce3f043) | [Code](src/08abd2df-1406-4939-a1a6-94d2fce3f043/code.php) | [Settings](src/08abd2df-1406-4939-a1a6-94d2fce3f043/settings.json) | Super__08abd2df_1406_4939_a1a6_94d2fce3f043__Power
- **class Moderate** | [Details](src/34f2c249-64a7-4229-9592-77e58f6e994f) | [Code](src/34f2c249-64a7-4229-9592-77e58f6e994f/code.php) | [Settings](src/34f2c249-64a7-4229-9592-77e58f6e994f/settings.json) | Super__34f2c249_64a7_4229_9592_77e58f6e994f__Power
- **Namespace**: [VDM\Joomla\Openai\Abstraction](#vdm-joomla-openai-abstraction)
- **abstract class Api** | [Details](src/585de711-2784-4f89-90bf-94a8a63366f1) | [Code](src/585de711-2784-4f89-90bf-94a8a63366f1/code.php) | [Settings](src/585de711-2784-4f89-90bf-94a8a63366f1/settings.json) | Super__585de711_2784_4f89_90bf_94a8a63366f1__Power
- **Namespace**: [VDM\Joomla\Openai\Service](#vdm-joomla-openai-service)
- **class Api** | [Details](src/ccf3141a-929d-4466-b122-9ace2eea8d70) | [Code](src/ccf3141a-929d-4466-b122-9ace2eea8d70/code.php) | [Settings](src/ccf3141a-929d-4466-b122-9ace2eea8d70/settings.json) | Super__ccf3141a_929d_4466_b122_9ace2eea8d70__Power
- **class Utilities** | [Details](src/07858e1f-5698-4227-8941-03dc93557938) | [Code](src/07858e1f-5698-4227-8941-03dc93557938/code.php) | [Settings](src/07858e1f-5698-4227-8941-03dc93557938/settings.json) | Super__07858e1f_5698_4227_8941_03dc93557938__Power
- **Namespace**: [VDM\Joomla\Openai\Utilities](#vdm-joomla-openai-utilities)
- **final class Http** | [Details](src/4c58b254-aea5-40aa-b54d-9586a1690451) | [Code](src/4c58b254-aea5-40aa-b54d-9586a1690451/code.php) | [Settings](src/4c58b254-aea5-40aa-b54d-9586a1690451/settings.json) | Super__4c58b254_aea5_40aa_b54d_9586a1690451__Power
- **final class Response** | [Details](src/c464393e-7606-406e-8463-a86774590966) | [Code](src/c464393e-7606-406e-8463-a86774590966/code.php) | [Settings](src/c464393e-7606-406e-8463-a86774590966/settings.json) | Super__c464393e_7606_406e_8463_a86774590966__Power
- **final class Uri** | [Details](src/13ef84f4-25b0-43dd-a9f6-0722abf220c1) | [Code](src/13ef84f4-25b0-43dd-a9f6-0722abf220c1/code.php) | [Settings](src/13ef84f4-25b0-43dd-a9f6-0722abf220c1/settings.json) | Super__13ef84f4_25b0_43dd_a9f6_0722abf220c1__Power
# Class Diagrams
## VDM Joomla Openai
> namespace VDM\Joomla\Openai
```uml
@startuml
namespace VDM\Joomla\Openai #DarkCyan {
abstract Factory #Orange {
# static $container
+ {static} _() : Mixed
+ {static} getContainer() : Container
# {static} createContainer() : Container
}
class Audio #Gold {
+ transcribe() : ?object
+ translation() : ?object
}
class Chat #Gold {
+ create() : ?object
}
class Completions #Gold {
+ create() : ?object
}
class Edits #Gold {
+ create() : ?object
}
class Embeddings #Gold {
+ create() : ?object
}
class Files #Gold {
+ list() : ?object
+ upload() : ?object
+ info() : ?object
+ content() : mixed
+ delete() : ?object
}
class FineTunes #Gold {
+ list() : ?object
}
class Images #Gold {
+ generate() : ?object
+ edit() : ?object
+ variation() : ?object
}
class Models #Gold {
+ list() : ?object
}
class Moderate #Gold {
+ text() : ?object
}
}
@enduml
```
## VDM Joomla Openai Abstraction
> namespace VDM\Joomla\Openai\Abstraction
```uml
@startuml
namespace VDM\Joomla\Openai\Abstraction #Olive {
abstract Api #Orange {
# Http $http
# Uri $uri
# Response $response
+ __construct()
}
}
@enduml
```
## VDM Joomla Openai Service
> namespace VDM\Joomla\Openai\Service
```uml
@startuml
namespace VDM\Joomla\Openai\Service #Olive {
class Api #Gold {
+ register() : void
+ getAudio() : Audio
+ getChat() : Chat
+ getCompletions() : Completions
+ getEdits() : Edits
+ getEmbeddings() : Embeddings
+ getFiles() : Files
+ getFineTunes() : FineTunes
+ getImages() : Images
+ getModels() : Models
+ getModerate() : Moderate
}
class Utilities #Gold {
+ register() : void
+ getUri() : Uri
+ getResponse() : Response
+ getHttp() : Http
}
}
@enduml
```
## VDM Joomla Openai Utilities
> namespace VDM\Joomla\Openai\Utilities
```uml
@startuml
namespace VDM\Joomla\Openai\Utilities #Olive {
class Http << (F,LightGreen) >> #Green {
+ __construct()
}
class Response << (F,LightGreen) >> #Green {
+ get() : mixed
+ get_() : mixed
# body() : mixed
# error() : string
}
class Uri << (F,LightGreen) >> #Green {
- string $version
- string $url
+ __construct()
+ get() : JoomlaUri
+ api() : string
- setUrl() : void
- setVersion() : void
}
}
@enduml
```
---
```
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝
██████╗ ██╗ ██╗██╗██╗ ██████╗ ███████╗██████╗
██╔══██╗██║ ██║██║██║ ██╔══██╗██╔════╝██╔══██╗
██████╔╝██║ ██║██║██║ ██║ ██║█████╗ ██████╔╝
██╔══██╗██║ ██║██║██║ ██║ ██║██╔══╝ ██╔══██╗
██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)