BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
public_html
/
app.imagivibe.com
/
vendor
/
openai-php
/
client
/
src
📤 Upload
📝 New File
📁 New Folder
Close
Editing: OpenAI.php
<?php declare(strict_types=1); use OpenAI\Client; use OpenAI\Factory; final class OpenAI { /** * Creates a new Open AI Client with the given API token. */ public static function client(string $apiKey, ?string $organization = null, ?string $project = null): Client { return self::factory() ->withApiKey($apiKey) ->withOrganization($organization) ->withProject($project) ->withHttpHeader('OpenAI-Beta', 'assistants=v2') ->make(); } /** * Creates a new factory instance to configure a custom Open AI Client */ public static function factory(): Factory { return new Factory; } }
Save
Cancel