File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Symfony \AI \Agent \Toolbox \Tool \Clock ;
6+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
7+
8+ return static function (ContainerConfigurator $ containerConfigurator ): void {
9+ $ services = $ containerConfigurator ->services ();
10+
11+ $ services ->defaults ()
12+ ->autowire ()
13+ ->autoconfigure ();
14+
15+ $ services ->set (Clock::class);
16+
17+ $ containerConfigurator ->extension ('ai ' , [
18+ 'platform ' => [
19+ 'openai ' => [
20+ 'api_key ' => '%env(OPENAI_API_KEY)% ' ,
21+ ],
22+ ],
23+ 'agent ' => [
24+ 'default ' => [
25+ 'platform ' => 'ai.platform.openai ' ,
26+ 'model ' => [
27+ 'class ' => 'Symfony\AI\Platform\Bridge\OpenAI\GPT ' ,
28+ 'name ' => 'gpt-4o-mini ' ,
29+ ],
30+ 'system_prompt ' => 'You are a helpful assistant and you can provide the current date and time.
31+ ' ,
32+ 'tools ' => ['Symfony\AI\Agent\Toolbox\Tool\Clock ' ],
33+ ],
34+ ],
35+ ]);
36+ };
Original file line number Diff line number Diff line change 1+ {
2+ "bundles" : {
3+ "Symfony\\ AI\\ AIBundle" : [" all" ]
4+ },
5+ "copy-from-recipe" : {
6+ "config/" : " %CONFIG_DIR%/"
7+ },
8+ "env" : {
9+ "OPENAI_API_KEY" : " "
10+ },
11+ "aliases" : [" ai" ]
12+ }
You can’t perform that action at this time.
0 commit comments