Skip to content

Commit 9496f51

Browse files
committed
feature #1203 [AI Bundle] Remove dependency from AI bundle to OpenAI Bridge (lochmueller)
This PR was merged into the main branch. Discussion ---------- [AI Bundle] Remove dependency from AI bundle to OpenAI Bridge | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | Fix #1202 | License | MIT Remove the constants of the open AI Bridge in the AI Bundle configuration to remove the hard dependency. I think it is the better solution instead of adding the bridge to the composer.json. Commits ------- 498d01f [AI Bundle] Remove dependency from AI bundle to OpenAI Bridge
2 parents ae13591 + 498d01f commit 9496f51

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ai-bundle/config/options.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Codewithkyrian\ChromaDB\Client as ChromaDbClient;
1515
use MongoDB\Client as MongoDbClient;
1616
use Probots\Pinecone\Client as PineconeClient;
17-
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1817
use Symfony\AI\Platform\Capability;
1918
use Symfony\AI\Platform\Model;
2019
use Symfony\AI\Platform\PlatformInterface;
@@ -166,7 +165,7 @@
166165
->scalarNode('region')
167166
->defaultNull()
168167
->validate()
169-
->ifNotInArray([null, PlatformFactory::REGION_EU, PlatformFactory::REGION_US])
168+
->ifNotInArray([null, 'EU', 'US'])
170169
->thenInvalid('The region must be either "EU" (https://eu.api.openai.com), "US" (https://us.api.openai.com) or null (https://api.openai.com)')
171170
->end()
172171
->info('The region for OpenAI API (EU, US, or null for default)')

0 commit comments

Comments
 (0)