Files
api/services/nginx/app/modules/openAI/openAI_c.php
T
Jeppe Bundgaard a0fd41fba1 Add image upload support, file handling improvements, and OpenAI integration
- Introduced `uploadRoute` to handle image uploads with MIME type validation and size restrictions.
- Added `upload_store` class for managing file storage and generating presigned URLs for upload/download.
- Enhanced file server to differentiate between PDFs and uploaded files, supporting dynamic content delivery.
- Integrated OpenAI module for License Plate Recognition (LPR), including API configuration and schema validation.
- Updated core structure with new interfaces (`minio_uploads_i`, `openai_i`) and classes (`openai`, `upload_store`).
- Adjusted `index.php` and file routes to support dynamic MIME checks and direct link generation.
2025-08-18 16:50:30 +02:00

36 lines
853 B
PHP

<?php
namespace openAI;
require_once WD . '/modules/openAI/config/openAI_enabled_c.php';
require_once WD . '/modules/openAI/config/openAI_api_key_c.php';
use openAI\config\openAI_api_key_c;
use openAI\config\openAI_enabled_c;
use traits\module_config_t;
class openAI_c
{
use module_config_t;
/**
* The status of openAI, whether it is enabled or not
* @var openAI_enabled_c
*/
public openAI_enabled_c $enabled;
/**
* The API key for openAI
* @var openAI_api_key_c
*/
public openAI_api_key_c $api_key;
public function __construct()
{
$this->setupConfig('openAI');
$this->allowUpdate([
openAI_enabled_c::class,
openAI_api_key_c::class,
]);
$this->enabled = new openAI_enabled_c();
$this->api_key = new openAI_api_key_c();
}
}