Skip to content

Commit 72ffcc5

Browse files
committed
Remove azure bridge from demo
1 parent 7debdfa commit 72ffcc5

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

demo/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"mrmysql/youtube-transcript": "^0.0.5",
1313
"nyholm/psr7": "^1.8",
1414
"php-http/discovery": "^1.20",
15-
"symfony/ai-azure-platform": "@dev",
1615
"symfony/ai-bundle": "@dev",
1716
"symfony/ai-chroma-db-store": "@dev",
1817
"symfony/ai-clock-tool": "@dev",

demo/config/reference.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,16 @@
159159
* version: string,
160160
* http_client?: string, // Service ID of the HTTP client to use // Default: "http_client"
161161
* },
162+
* decart?: array{
163+
* api_key: string,
164+
* host?: string, // Default: "https://api.decart.ai/v1"
165+
* http_client?: string, // Service ID of the HTTP client to use // Default: "http_client"
166+
* },
162167
* elevenlabs?: array{
163168
* api_key: string,
164169
* host?: string, // Default: "https://api.elevenlabs.io/v1"
165170
* http_client?: string, // Service ID of the HTTP client to use // Default: "http_client"
171+
* api_catalog?: bool, // If set, the ElevenLabs API will be used to build the catalog and retrieve models information, using this option leads to additional HTTP calls
166172
* },
167173
* gemini?: array{
168174
* api_key: string,
@@ -236,7 +242,6 @@
236242
* }>>,
237243
* agent?: array<string, array{ // Default: []
238244
* platform?: string, // Service name of platform // Default: "Symfony\\AI\\Platform\\PlatformInterface"
239-
* track_token_usage?: bool, // Enable tracking of token usage for the agent // Default: true
240245
* model?: mixed,
241246
* memory?: mixed, // Memory configuration: string for static memory, or array with "service" key for service reference // Default: null
242247
* prompt?: string|array{ // The system prompt configuration
@@ -355,6 +360,14 @@
355360
* distance?: string, // Default: "cosine"
356361
* quantization?: bool,
357362
* }>,
363+
* elasticsearch?: array<string, array{ // Default: []
364+
* endpoint?: string,
365+
* index_name?: string,
366+
* vectors_field?: string, // Default: "_vectors"
367+
* dimensions?: int, // Default: 1536
368+
* similarity?: string, // Default: "cosine"
369+
* http_client?: string, // Default: "http_client"
370+
* }>,
358371
* opensearch?: array<string, array{ // Default: []
359372
* endpoint?: string,
360373
* index_name?: string,

src/ai-bundle/src/AiBundle.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,11 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
380380
}
381381

382382
if ('azure' === $type) {
383-
if (!ContainerBuilder::willBeAvailable('symfony/ai-azure-platform', AzureOpenAiPlatformFactory::class, ['symfony/ai-bundle'])) {
384-
throw new RuntimeException('Azure platform configuration requires "symfony/ai-azure-platform" package. Try running "composer require symfony/ai-azure-platform".');
385-
}
386-
387383
foreach ($platform as $name => $config) {
384+
if (!ContainerBuilder::willBeAvailable('symfony/ai-azure-platform', AzureOpenAiPlatformFactory::class, ['symfony/ai-bundle'])) {
385+
throw new RuntimeException('Azure platform configuration requires "symfony/ai-azure-platform" package. Try running "composer require symfony/ai-azure-platform".');
386+
}
387+
388388
$platformId = 'ai.platform.azure.'.$name;
389389
$definition = (new Definition(Platform::class))
390390
->setFactory(AzureOpenAiPlatformFactory::class.'::create')
@@ -536,11 +536,11 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
536536
}
537537

538538
if ('generic' === $type) {
539-
if (!ContainerBuilder::willBeAvailable('symfony/ai-generic-platform', GenericPlatformFactory::class, ['symfony/ai-bundle'])) {
540-
throw new RuntimeException('Generic platform configuration requires "symfony/ai-generic-platform" package. Try running "composer require symfony/ai-generic-platform".');
541-
}
542-
543539
foreach ($platform as $name => $config) {
540+
if (!ContainerBuilder::willBeAvailable('symfony/ai-generic-platform', GenericPlatformFactory::class, ['symfony/ai-bundle'])) {
541+
throw new RuntimeException('Generic platform configuration requires "symfony/ai-generic-platform" package. Try running "composer require symfony/ai-generic-platform".');
542+
}
543+
544544
$platformId = 'ai.platform.generic.'.$name;
545545
$definition = (new Definition(Platform::class))
546546
->setFactory(GenericPlatformFactory::class.'::create')

0 commit comments

Comments
 (0)