Skip to content

Conversation

OskarStark
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Docs? no
Issues --
License MIT

@carsonbot carsonbot added Feature New feature Store Issues & PRs about the AI Store component Status: Needs Review labels Aug 29, 2025
@OskarStark OskarStark merged commit c839ddc into symfony:main Aug 29, 2025
7 checks passed
pentiminax pushed a commit to pentiminax/symfony-ai that referenced this pull request Sep 3, 2025
This PR adds support for [Albert
API](https://github.com/etalab-ia/albert-api), the French government's
sovereign AI gateway. Albert provides an OpenAI-compatible API interface
for various language models while ensuring data sovereignty and
compliance with French/EU regulations.

- 🇫🇷 **Sovereign AI**: Albert is hosted and operated by the French
government
- 🔧 **OpenAI-compatible**: Uses the same API structure as OpenAI
- 🔒 **Data Privacy**: Ensures data remains within French/EU jurisdiction
- 🎯 **Public Sector Focus**: Designed for use by French public
administration

- Created Albert-specific model clients (GPTModelClient and
EmbeddingsModelClient) with configurable base URL
- Added PlatformFactory for easy Albert API initialization
- Reuses OpenAI's response converters for compatibility
- Supports both chat completions and embeddings endpoints

```php
use PhpLlm\LlmChain\Platform\Bridge\Albert\PlatformFactory;
use PhpLlm\LlmChain\Platform\Bridge\OpenAI\GPT;

$platform = PlatformFactory::create(
    apiKey: $_ENV['ALBERT_API_KEY'],
    albertUrl: $_ENV['ALBERT_API_URL']
);

$model = new GPT('gpt-4o');
$chain = new Chain($platform, $model);
```

- Added unit tests for PlatformFactory
- Added example script demonstrating Albert API usage with RAG context
- All tests pass and code follows project standards

- Updated README to list Albert as a supported platform
- Added example file showing how to use Albert API
- Included context about French AI strategy in the example

This implementation allows French public sector organizations to
leverage LLM Chain while maintaining data sovereignty and regulatory
compliance.

Closes symfony#346
pentiminax pushed a commit to pentiminax/symfony-ai that referenced this pull request Sep 3, 2025
This PR was merged into the main branch.

Discussion
----------

[Platform] add Albert API support

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| Docs?         | yes
| Issues        |
| License       | MIT

Cherry picking php-llm/llm-chain#366

Commits
-------

99ce42a feat: add Albert API support (symfony#366)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Status: Needs Review Store Issues & PRs about the AI Store component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants