mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 23:26:27 +03:00
@@ -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'
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Symfony\\AI\\AIBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"OPENAI_API_KEY": ""
|
||||
},
|
||||
"aliases": ["ai"]
|
||||
}
|
||||
Reference in New Issue
Block a user