inspired by mirzaev/neurobot project
This commit is contained in:
21
mirzaev/neuroseti/system/api.php
Normal file
21
mirzaev/neuroseti/system/api.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace mirzaev\neuroseti;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API
|
||||||
|
*
|
||||||
|
* Types of neural networks API
|
||||||
|
*
|
||||||
|
* @package mirzaev\neuroseti
|
||||||
|
*
|
||||||
|
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
|
||||||
|
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
||||||
|
*/
|
||||||
|
enum api: string
|
||||||
|
{
|
||||||
|
case openai = 'OpenAI';
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace mirzaev\neuroseti;
|
namespace mirzaev\neuroseti;
|
||||||
|
|
||||||
|
// Files of the project
|
||||||
|
use mirzaev\neuroseti\api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Neural network
|
* Neural network
|
||||||
*
|
*
|
||||||
@@ -39,5 +42,31 @@ enum network: string
|
|||||||
// OpenAI Image Generation
|
// OpenAI Image Generation
|
||||||
case gpt_image_1 = 'GPT image 1';
|
case gpt_image_1 = 'GPT image 1';
|
||||||
case gpt_image_1_mini = 'GPT image 1 mini';
|
case gpt_image_1_mini = 'GPT image 1 mini';
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API
|
||||||
|
*
|
||||||
|
* @return api The neural network API
|
||||||
|
*/
|
||||||
|
public function api(): api
|
||||||
|
{
|
||||||
|
// Exit (success)
|
||||||
|
return match ($this) {
|
||||||
|
static::gpt_4_1,
|
||||||
|
static::gpt_4_1_mini,
|
||||||
|
static::gpt_4_1_nano,
|
||||||
|
static::o_4_mini,
|
||||||
|
static::gpt_5,
|
||||||
|
static::gpt_5_mini,
|
||||||
|
static::gpt_5_nano,
|
||||||
|
static::gpt_5_pro,
|
||||||
|
static::gpt_realtime,
|
||||||
|
static::gpt_realtime_mini,
|
||||||
|
static::sora_2,
|
||||||
|
static::sora_2_pro,
|
||||||
|
static::gpt_image_1,
|
||||||
|
static::gpt_image_1_mini,
|
||||||
|
=> api::openai
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user