|
38 | 38 | use Symfony\AI\Chat\Bridge\Meilisearch\MessageStore as MeilisearchMessageStore; |
39 | 39 | use Symfony\AI\Chat\Bridge\Pogocache\MessageStore as PogocacheMessageStore; |
40 | 40 | use Symfony\AI\Chat\MessageStoreInterface; |
| 41 | +use Symfony\AI\Platform\Bridge\Albert\PlatformFactory as AlbertPlatformFactory; |
41 | 42 | use Symfony\AI\Platform\Bridge\Anthropic\PlatformFactory as AnthropicPlatformFactory; |
42 | 43 | use Symfony\AI\Platform\Bridge\Azure\OpenAi\PlatformFactory as AzureOpenAiPlatformFactory; |
43 | 44 | use Symfony\AI\Platform\Bridge\Cerebras\PlatformFactory as CerebrasPlatformFactory; |
@@ -246,6 +247,26 @@ public function loadExtension(array $config, ContainerConfigurator $container, C |
246 | 247 | */ |
247 | 248 | private function processPlatformConfig(string $type, array $platform, ContainerBuilder $container): void |
248 | 249 | { |
| 250 | + if ('albert' === $type) { |
| 251 | + $platformId = 'ai.platform.albert'; |
| 252 | + $definition = (new Definition(Platform::class)) |
| 253 | + ->setFactory(AlbertPlatformFactory::class.'::create') |
| 254 | + ->setLazy(true) |
| 255 | + ->addTag('proxy', ['interface' => PlatformInterface::class]) |
| 256 | + ->setArguments([ |
| 257 | + $platform['api_key'], |
| 258 | + $platform['base_url'], |
| 259 | + new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE), |
| 260 | + new Reference('ai.platform.model_catalog.albert'), |
| 261 | + new Reference('event_dispatcher'), |
| 262 | + ]) |
| 263 | + ->addTag('ai.platform', ['name' => 'albert']); |
| 264 | + |
| 265 | + $container->setDefinition($platformId, $definition); |
| 266 | + |
| 267 | + return; |
| 268 | + } |
| 269 | + |
249 | 270 | if ('anthropic' === $type) { |
250 | 271 | $platformId = 'ai.platform.anthropic'; |
251 | 272 | $definition = (new Definition(Platform::class)) |
|
0 commit comments