Skip to content

Commit 1da4f58

Browse files
committed
minor #217 Rename AIBundle to AiBundle, etc. (fabpot)
This PR was squashed before being merged into the main branch. Discussion ---------- Rename AIBundle to AiBundle, etc. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | n/a | License | MIT Rename AIBundle to AiBundle to follow Symfony naming convention. Commits ------- 0d087be Rename SurrealDB to SurrealDb b5d3017 Rename TransformersPHP to TransformersPhp f86f59b Rename MongoDB to MongoDb a458c95 Rename ChromaDB to ChromaDb 5f1f612 Rename LMStudio to LmStudio 6bdbd37 Rename MariaDB to MariaDb c98caa3 Rename GPT to Gpt 4017288 Rename OpenAI to OpenAi 6dc1fa2 Rename AIBundle to AiBundle
2 parents dab21e0 + 0d087be commit 1da4f58

File tree

139 files changed

+434
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+434
-434
lines changed

.phpstan/ForbidNativeExceptionRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ final class ForbidNativeExceptionRule implements Rule
5353
'Symfony\\AI\\Platform' => 'Symfony\\AI\\Platform\\Exception\\',
5454
'Symfony\\AI\\Store' => 'Symfony\\AI\\Store\\Exception\\',
5555
'Symfony\\AI\\McpSdk' => 'Symfony\\AI\\McpSdk\\Exception\\',
56-
'Symfony\\AI\\AIBundle' => 'Symfony\\AI\\AIBundle\\Exception\\',
56+
'Symfony\\AI\\AiBundle' => 'Symfony\\AI\\AiBundle\\Exception\\',
5757
'Symfony\\AI\\McpBundle' => 'Symfony\\AI\\McpBundle\\Exception\\',
5858
];
5959

demo/config/bundles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
2323
Symfony\UX\Icons\UXIconsBundle::class => ['all' => true],
2424
Symfony\UX\Typed\TypedBundle::class => ['all' => true],
25-
Symfony\AI\AIBundle\AIBundle::class => ['all' => true],
25+
Symfony\AI\AiBundle\AiBundle::class => ['all' => true],
2626
Symfony\AI\McpBundle\McpBundle::class => ['all' => true],
2727
];

demo/config/packages/ai.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ai:
66
blog:
77
# platform: 'ai.platform.anthropic'
88
model:
9-
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
10-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
9+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
10+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
1111
tools:
1212
- 'Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch'
1313
- service: 'clock'
@@ -16,8 +16,8 @@ ai:
1616
method: 'now'
1717
stream:
1818
model:
19-
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
20-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
19+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
20+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
2121
system_prompt: |
2222
You are an example chat application where messages from the LLM are streamed to the user using
2323
Server-Sent Events via `symfony/ux-turbo` / Turbo Streams. This example does not use any custom
@@ -26,13 +26,13 @@ ai:
2626
tools: false
2727
youtube:
2828
model:
29-
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
30-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
29+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
30+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
3131
tools: false
3232
wikipedia:
3333
model:
34-
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
35-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
34+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
35+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
3636
options:
3737
temperature: 0.5
3838
system_prompt: 'Please answer the users question based on Wikipedia and provide a link to the article.'
@@ -41,8 +41,8 @@ ai:
4141
- 'Symfony\AI\Agent\Toolbox\Tool\Wikipedia'
4242
audio:
4343
model:
44-
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
45-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
44+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
45+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
4646
system_prompt: 'You are a friendly chatbot that likes to have a conversation with users and asks them some questions.'
4747
tools:
4848
# Agent in agent 🤯
@@ -56,8 +56,8 @@ ai:
5656
indexer:
5757
default:
5858
model:
59-
class: 'Symfony\AI\Platform\Bridge\OpenAI\Embeddings'
60-
name: !php/const Symfony\AI\Platform\Bridge\OpenAI\Embeddings::TEXT_ADA_002
59+
class: 'Symfony\AI\Platform\Bridge\OpenAi\Embeddings'
60+
name: !php/const Symfony\AI\Platform\Bridge\OpenAi\Embeddings::TEXT_ADA_002
6161

6262
services:
6363
_defaults:

demo/src/Audio/Chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace App\Audio;
1313

1414
use Symfony\AI\Agent\AgentInterface;
15-
use Symfony\AI\Platform\Bridge\OpenAI\Whisper;
15+
use Symfony\AI\Platform\Bridge\OpenAi\Whisper;
1616
use Symfony\AI\Platform\Message\Content\Audio;
1717
use Symfony\AI\Platform\Message\Message;
1818
use Symfony\AI\Platform\Message\MessageBag;

demo/src/Blog/Command/QueryCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace App\Blog\Command;
1313

1414
use Codewithkyrian\ChromaDB\Client;
15-
use Symfony\AI\Platform\Bridge\OpenAI\Embeddings;
15+
use Symfony\AI\Platform\Bridge\OpenAi\Embeddings;
1616
use Symfony\AI\Platform\PlatformInterface;
1717
use Symfony\Component\Console\Attribute\AsCommand;
1818
use Symfony\Component\Console\Command\Command;

demo/src/Video/TwigComponent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace App\Video;
1313

14-
use Symfony\AI\Platform\Bridge\OpenAI\GPT;
14+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1515
use Symfony\AI\Platform\Message\Content\Image;
1616
use Symfony\AI\Platform\Message\Message;
1717
use Symfony\AI\Platform\Message\MessageBag;
@@ -47,7 +47,7 @@ public function submit(#[LiveArg] string $instruction, #[LiveArg] string $image)
4747
Message::ofUser($instruction, Image::fromDataUrl($image))
4848
);
4949

50-
$result = $this->platform->invoke(new GPT(GPT::GPT_4O_MINI), $messageBag, [
50+
$result = $this->platform->invoke(new Gpt(Gpt::GPT_4O_MINI), $messageBag, [
5151
'max_tokens' => 100,
5252
]);
5353

examples/albert/chat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Platform\Bridge\Albert\PlatformFactory;
14-
use Symfony\AI\Platform\Bridge\OpenAI\GPT;
14+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1515
use Symfony\AI\Platform\Message\Message;
1616
use Symfony\AI\Platform\Message\MessageBag;
1717

1818
require_once dirname(__DIR__).'/bootstrap.php';
1919

2020
$platform = PlatformFactory::create(env('ALBERT_API_KEY'), env('ALBERT_API_URL'), http_client());
2121

22-
$model = new GPT('gpt-4o');
22+
$model = new Gpt('gpt-4o');
2323
$agent = new Agent($platform, $model, logger: logger());
2424

2525
$documentContext = <<<'CONTEXT'

examples/azure/audio-transcript.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
use Symfony\AI\Platform\Bridge\Azure\OpenAI\PlatformFactory;
13-
use Symfony\AI\Platform\Bridge\OpenAI\Whisper;
12+
use Symfony\AI\Platform\Bridge\Azure\OpenAi\PlatformFactory;
13+
use Symfony\AI\Platform\Bridge\OpenAi\Whisper;
1414
use Symfony\AI\Platform\Message\Content\Audio;
1515

1616
require_once dirname(__DIR__).'/bootstrap.php';

examples/azure/chat-gpt.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
use Symfony\AI\Agent\Agent;
13-
use Symfony\AI\Platform\Bridge\Azure\OpenAI\PlatformFactory;
14-
use Symfony\AI\Platform\Bridge\OpenAI\GPT;
13+
use Symfony\AI\Platform\Bridge\Azure\OpenAi\PlatformFactory;
14+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1515
use Symfony\AI\Platform\Message\Message;
1616
use Symfony\AI\Platform\Message\MessageBag;
1717

@@ -24,7 +24,7 @@
2424
env('AZURE_OPENAI_KEY'),
2525
http_client(),
2626
);
27-
$model = new GPT(GPT::GPT_4O_MINI);
27+
$model = new Gpt(Gpt::GPT_4O_MINI);
2828

2929
$agent = new Agent($platform, $model, logger: logger());
3030
$messages = new MessageBag(

examples/azure/embeddings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
use Symfony\AI\Platform\Bridge\Azure\OpenAI\PlatformFactory;
13-
use Symfony\AI\Platform\Bridge\OpenAI\Embeddings;
12+
use Symfony\AI\Platform\Bridge\Azure\OpenAi\PlatformFactory;
13+
use Symfony\AI\Platform\Bridge\OpenAi\Embeddings;
1414

1515
require_once dirname(__DIR__).'/bootstrap.php';
1616

0 commit comments

Comments
 (0)