yomeva / open-ai-bundle
This bundles allows you to make calls to the OpenAI APIs.
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/config: ^7.1
- symfony/dependency-injection: ^7.1
- symfony/expression-language: ^7.1
- symfony/http-client: ^7.1
- symfony/http-kernel: ^7.1
- symfony/property-access: ^7.1
- symfony/serializer: ^7.1
- symfony/validator: ^7.1
Requires (Dev)
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^9.5
- symfony/dotenv: ^7.1
This package is auto-updated.
Last update: 2025-06-29 02:18:28 UTC
README
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require yomeva/openai-bundle
Step 2: Check if the Bundle is enabled, and if not, enable it
By adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php return [ // ... Yomeva\OpenAiBundle\YomevaOpenAiBundle::class => ['all' => true], ];
Step 3: Add a OpenAI API key env var to a config file
Define the YAML config as follows and use an environment variable
# config/packages/yomeva_open_ai.yaml yomeva_open_ai: api_key: '%env(resolve:OPEN_AI_API_KEY)%'
Step 4: Add a staging project OpenAI API key to a .env.test.local file for PHPUnit (data of this OpenAI project can be lost)
OPEN_AI_API_TEST_KEY=your-staging-key