yomeva / open-ai-bundle
This bundles allows you to make calls to the OpenAI APIs.
Package info
github.com/AlfredWallace/YomevaOpenAiBundle
Type:symfony-bundle
pkg:composer/yomeva/open-ai-bundle
1.0.2
2024-11-29 14:37 UTC
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: 2026-04-29 01:40:42 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