PHP code example of moontechs / filamentphp-openai-management

1. Go to this page and download the library: Download moontechs/filamentphp-openai-management library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

moontechs / filamentphp-openai-management example snippets


return [
    'disk' => 'local', // you can customize used disk and upload/download folders
    'directory' => 'openai-files',
    'download-disk' => 'local',
    'download-directory' => 'openai-files-downloads',

    'select-options' => [
        'file-purpose' => [
            'batch' => 'batch',
            'assistants' => 'assistants',
            'fine-tune' => 'fine-tune',
        ],
        'batch-endpoint' => [
            '/v1/chat/completions' => '/v1/chat/completions',
            '/v1/embeddings' => '/v1/embeddings',
            '/v1/completions' => '/v1/completions',
        ],
    ],
];

use Moontechs\OpenAIManagement\OpenAIManagementPlugin;

->plugins([
    new OpenAIManagementPlugin,
])
bash
php artisan vendor:publish --tag="filamentphp-openai-management-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="filamentphp-openai-management-config"