AI's Configuration
These properties serve as essential configurations needed to set up before using OpenAI
APIs to interact with AI
models.
- Class namespace:
\App\Config\AI
- File path:
/app/Config/AI.php
- This class is marked as final and can't be subclassed
Properties
handler
The AI
handler class (default: OpenAI
).Currently only OpenAI is supported.
public string $handler = 'OpenAI';
apiKey
Your AI
provider's API key (Required).To register an account on the OpenAI
platform and receive an API key, visit https://platform.openai.com/.
public string $apiKey = '';
organization
Optionally set your OpenAI Organization ID.
public ?string $organization = null;
Reference
project
Optionally set your OpenAI Project ID.
public ?string $project = null;
version
Optionally set your OpenAI API version (default: v1
).
public string $version = 'v1';