Skip to content

Commit d426e25

Browse files
authored
Add symfony/ai-bundle (#1438)
* Add symfony/ai-bundle * -
1 parent 79f2455 commit d426e25

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# config/packages/ai.yaml
2+
services:
3+
_defaults:
4+
autowire: true
5+
autoconfigure: true
6+
7+
Symfony\AI\Agent\Toolbox\Tool\Clock: null
8+
9+
ai:
10+
platform:
11+
openai:
12+
api_key: '%env(OPENAI_API_KEY)%'
13+
14+
agent:
15+
default:
16+
platform: 'ai.platform.openai'
17+
model:
18+
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
19+
name: 'gpt-4o-mini' # !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
20+
system_prompt: |
21+
You are a helpful assistant and you can provide the current date and time.
22+
tools:
23+
- 'Symfony\AI\Agent\Toolbox\Tool\Clock'

symfony/ai-bundle/0.1/manifest.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

0 commit comments

Comments
 (0)