amazeeio / symfony-amazeeai-configure
Symfony command to configure the amazee.ai provider via email-based authentication.
Package info
github.com/amazeeio/symfony-amazeeai-configure
Type:symfony-bundle
pkg:composer/amazeeio/symfony-amazeeai-configure
Requires
- php: >=8.4
- symfony/config: ^8.0
- symfony/console: ^8.0
- symfony/dependency-injection: ^8.0
- symfony/http-client: ^8.0
- symfony/http-kernel: ^8.0
- symfony/process: ^8.0
Requires (Dev)
- captainhook/captainhook: ^5.23
- captainhook/plugin-composer: ^5.3
- friendsofphp/php-cs-fixer: ^3.93
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^12.5
- spatie/ray: ^1.45
- symfony/dotenv: ^8.0
README
Symfony command to configure the amazee.ai provider via email-based authentication.
Installation
Install the bundle via Composer
This package is a pre-release that will be published on Packagist,
for now configure this repository in composer.json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/amazeeio/symfony-amazeeai-configure.git"
}
]
}
composer require amazeeio/symfony-amazeeai-configure
If you're using Symfony Flex, the bundle will be automatically registered. Otherwise, add it to your config/bundles.php:
return [ // ... AmazeeIo\AmazeeAiConfigure\AmazeeAiConfigureBundle::class => ['all' => true], ];
Configure
A Symfony Console command is used to configure amazee.ai LLM and Vector Database providers with the Private AI Keys as a Service.
php bin/console ai:amazee:configure user@example.com
or symfony console ai:amazee:configure user@example.com with the Symfony CLI.
This will send a PIN code to the provided email that can be exchanged for a LLM API key and VDB credentials.
On development environments, we will store the following in .env.local
AMAZEEAI_LLM_KEY=sk-... AMAZEEAI_LLM_API_URL=https://llm.[region].amazee.ai AMAZEEAI_VDB_HOST=vectordb1.[region].amazee.ai AMAZEEAI_VDB_PORT=5432 AMAZEEAI_VDB_NAME=db_abcd1234 AMAZEEAI_VDB_USER=user_abcd1234 AMAZEEAI_VDB_PASSWORD=... AMAZEEAI_VDB_DSN="pgsql:host=${AMAZEEAI_VDB_HOST};port=${AMAZEEAI_VDB_PORT};dbname=${AMAZEEAI_VDB_NAME}"
Sensitive env vars are AMAZEEAI_LLM_KEY and AMAZEEAI_VDB_PASSWORD,
these should be stored with Symfony secrets.
Development
By default, API requests are using the prod environment: api.amazee.ai.
Use the -a option to redirect API requests to dev or stage API environments.
symfony console ai:amazee:configure user@example.com -a dev.api.example.com
Contributing
For contribution in general, refer to Symfony Contributing.
This project uses git hooks to enforce conventional commits.
The CI will trigger
- PHPStan
vendor/bin/phpstan analyse - PHPUnit
vendor/bin/phpunit - PHPCS fixer
vendor/bin/php-cs-fixer fix
Conventional Commits
All commit messages must follow the Conventional Commits specification. The format is:
<type>[optional scope][!]: <description>
Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Examples:
feat: add user authentication
fix(api): resolve null pointer exception
feat!: breaking change in API
docs: update installation instructions
The git commit-msg hook will automatically validate your commit messages using CaptainHook.