Skip to content

Commit c98caa3

Browse files
committed
Rename GPT to Gpt
1 parent 4017288 commit c98caa3

Some content is hidden

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

55 files changed

+179
-179
lines changed

demo/config/packages/ai.yaml

Lines changed: 10 additions & 10 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 🤯

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/chat-gpt.php

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

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Platform\Bridge\Azure\OpenAi\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

@@ -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/memory/mariadb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\AI\Agent\Memory\EmbeddingProvider;
1616
use Symfony\AI\Agent\Memory\MemoryInputProcessor;
1717
use Symfony\AI\Platform\Bridge\OpenAi\Embeddings;
18-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
18+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1919
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
2020
use Symfony\AI\Platform\Message\Message;
2121
use Symfony\AI\Platform\Message\MessageBag;
@@ -66,7 +66,7 @@
6666
$embeddingsMemory = new EmbeddingProvider($platform, $embeddings, $store);
6767
$memoryProcessor = new MemoryInputProcessor($embeddingsMemory);
6868

69-
$agent = new Agent($platform, new GPT(GPT::GPT_4O_MINI), [$memoryProcessor], logger: logger());
69+
$agent = new Agent($platform, new Gpt(Gpt::GPT_4O_MINI), [$memoryProcessor], logger: logger());
7070
$messages = new MessageBag(Message::ofUser('Have we discussed about my friend John in the past? If yes, what did we talk about?'));
7171
$result = $agent->call($messages);
7272

examples/memory/static.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
use Symfony\AI\Agent\InputProcessor\SystemPromptInputProcessor;
1414
use Symfony\AI\Agent\Memory\MemoryInputProcessor;
1515
use Symfony\AI\Agent\Memory\StaticMemoryProvider;
16-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
16+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1717
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1818
use Symfony\AI\Platform\Message\Message;
1919
use Symfony\AI\Platform\Message\MessageBag;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

2323
$platform = PlatformFactory::create($_ENV['OPENAI_API_KEY'], http_client());
24-
$model = new GPT(GPT::GPT_4O_MINI);
24+
$model = new Gpt(Gpt::GPT_4O_MINI);
2525

2626
$systemPromptProcessor = new SystemPromptInputProcessor('You are a professional trainer with short, personalized advices and a motivating claim.');
2727

examples/misc/chat-system-prompt.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\Agent\InputProcessor\SystemPromptInputProcessor;
14-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
14+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1515
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1616
use Symfony\AI\Platform\Message\Message;
1717
use Symfony\AI\Platform\Message\MessageBag;
1818

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

2121
$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
22-
$model = new GPT(GPT::GPT_4O_MINI);
22+
$model = new Gpt(Gpt::GPT_4O_MINI);
2323

2424
$processor = new SystemPromptInputProcessor('You are Yoda and write like he speaks. But short.');
2525

examples/misc/parallel-chat-gpt.php

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

12-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
12+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1313
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1414
use Symfony\AI\Platform\Message\Message;
1515
use Symfony\AI\Platform\Message\MessageBag;
1616

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

1919
$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
20-
$model = new GPT(GPT::GPT_4O_MINI, [
20+
$model = new Gpt(Gpt::GPT_4O_MINI, [
2121
'temperature' => 0.5, // default options for the model
2222
]);
2323

examples/misc/persistent-chat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Chat;
1414
use Symfony\AI\Agent\Chat\MessageStore\InMemoryStore;
15-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
15+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1616
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1717
use Symfony\AI\Platform\Message\Message;
1818
use Symfony\AI\Platform\Message\MessageBag;
1919

2020
require_once dirname(__DIR__).'/bootstrap.php';
2121

2222
$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
23-
$llm = new GPT(GPT::GPT_4O_MINI);
23+
$llm = new Gpt(Gpt::GPT_4O_MINI);
2424

2525
$agent = new Agent($platform, $llm, logger: logger());
2626
$chat = new Chat($agent, new InMemoryStore());

examples/openai/audio-input.php

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

1212
use Symfony\AI\Agent\Agent;
13-
use Symfony\AI\Platform\Bridge\OpenAi\GPT;
13+
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
1414
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1515
use Symfony\AI\Platform\Message\Content\Audio;
1616
use Symfony\AI\Platform\Message\Message;
@@ -19,7 +19,7 @@
1919
require_once dirname(__DIR__).'/bootstrap.php';
2020

2121
$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
22-
$model = new GPT(GPT::GPT_4O_AUDIO);
22+
$model = new Gpt(Gpt::GPT_4O_AUDIO);
2323

2424
$agent = new Agent($platform, $model, logger: logger());
2525
$messages = new MessageBag(

0 commit comments

Comments
 (0)