Add symfony/ai-bundle (#1438)

* Add symfony/ai-bundle

* -
This commit is contained in:
Oskar Stark
2025-07-18 07:44:04 +02:00
committed by GitHub
parent 79f2455be0
commit d426e2588e
2 changed files with 35 additions and 0 deletions
@@ -0,0 +1,23 @@
# config/packages/ai.yaml
services:
_defaults:
autowire: true
autoconfigure: true
Symfony\AI\Agent\Toolbox\Tool\Clock: null
ai:
platform:
openai:
api_key: '%env(OPENAI_API_KEY)%'
agent:
default:
platform: 'ai.platform.openai'
model:
class: 'Symfony\AI\Platform\Bridge\OpenAI\GPT'
name: 'gpt-4o-mini' # !php/const Symfony\AI\Platform\Bridge\OpenAI\GPT::GPT_4O_MINI
system_prompt: |
You are a helpful assistant and you can provide the current date and time.
tools:
- 'Symfony\AI\Agent\Toolbox\Tool\Clock'
+12
View File
@@ -0,0 +1,12 @@
{
"bundles": {
"Symfony\\AI\\AIBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"OPENAI_API_KEY": ""
},
"aliases": ["ai"]
}