@@ -30,9 +30,7 @@ Configuration
30
30
api_key : ' %env(OPENAI_API_KEY)%'
31
31
agent :
32
32
default :
33
- model :
34
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
35
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
33
+ model : ' gpt-4o-mini'
36
34
37
35
**Advanced Example with Anthropic, Azure, ElevenLabs, Gemini, Perplexity, Vertex AI, Ollama multiple agents **
38
36
@@ -68,9 +66,7 @@ Configuration
68
66
platform : ' ai.platform.azure.gpt_deployment'
69
67
structured_output : false # Disables support for "output_structure" option, default is true
70
68
track_token_usage : true # Enable tracking of token usage for the agent, default is true
71
- model :
72
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
73
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
69
+ model : ' gpt-4o-mini'
74
70
memory : ' You have access to conversation history and user preferences' # Optional: static memory content
75
71
prompt : # The system prompt configuration
76
72
text : ' You are a helpful assistant that can answer questions.' # The prompt text
@@ -91,23 +87,17 @@ Configuration
91
87
description : ' Can research on Wikipedia'
92
88
research :
93
89
platform : ' ai.platform.anthropic'
94
- model :
95
- class : ' Symfony\AI\Platform\Bridge\Anthropic\Claude'
96
- name : !php/const Symfony\AI\Platform\Bridge\Anthropic\Claude::SONNET_37
90
+ model : ' claude-3-7-sonnet'
97
91
tools : # If undefined, all tools are injected into the agent, use "tools: false" to disable tools.
98
92
- ' Symfony\AI\Agent\Toolbox\Tool\Wikipedia'
99
93
fault_tolerant_toolbox : false # Disables fault tolerant toolbox, default is true
100
94
search_agent :
101
95
platform : ' ai.platform.perplexity'
102
- model :
103
- class : ' Symfony\AI\Platform\Bridge\Perplexity\Perplexity'
104
- name : !php/const Symfony\AI\Platform\Bridge\Perplexity\Perplexity::SONAR
96
+ model : ' sonar'
105
97
tools : false
106
98
audio :
107
99
platform : ' ai.platform.eleven_labs'
108
- model :
109
- class : ' Symfony\AI\Platform\Bridge\ElevenLabs'
110
- name : !php/const Symfony\AI\Platform\Bridge\ElevenLabs::TEXT_TO_SPEECH
100
+ model : ' text-to-speech'
111
101
tools : false
112
102
store :
113
103
chroma_db :
@@ -127,15 +117,12 @@ Configuration
127
117
openai_embeddings :
128
118
platform : ' ai.platform.openai'
129
119
model :
130
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Embeddings'
131
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Embeddings::TEXT_EMBEDDING_3_SMALL
120
+ name : ' text-embedding-3-small'
132
121
options :
133
122
dimensions : 512
134
123
mistral_embeddings :
135
124
platform : ' ai.platform.mistral'
136
- model :
137
- class : ' Symfony\AI\Platform\Bridge\Mistral\Embeddings'
138
- name : !php/const Symfony\AI\Platform\Bridge\Mistral\Embeddings::MISTRAL_EMBED
125
+ model : ' mistral-embed'
139
126
indexer :
140
127
default :
141
128
vectorizer : ' ai.vectorizer.openai_embeddings'
@@ -204,9 +191,7 @@ Models can be configured in two different ways to specify model options and para
204
191
ai :
205
192
agent :
206
193
my_agent :
207
- model :
208
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
209
- name : ' gpt-4o-mini?temperature=0.7&max_tokens=2000&stream=true'
194
+ model : ' gpt-4o-mini?temperature=0.7&max_tokens=2000&stream=true'
210
195
211
196
Alternatively, you can specify model options in a separate ``options `` section:
212
197
@@ -216,7 +201,6 @@ Alternatively, you can specify model options in a separate ``options`` section:
216
201
agent :
217
202
my_agent :
218
203
model :
219
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
220
204
name : ' gpt-4o-mini'
221
205
options :
222
206
temperature : 0.7
@@ -234,9 +218,7 @@ You can also define models for the vectorizer this way:
234
218
ai :
235
219
vectorizer :
236
220
embeddings :
237
- model :
238
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Embeddings'
239
- name : ' text-embedding-3-small?dimensions=512&encoding_format=float'
221
+ model : ' text-embedding-3-small?dimensions=512&encoding_format=float'
240
222
241
223
HTTP Client Configuration
242
224
-------------------------
@@ -274,9 +256,7 @@ For basic usage, specify the system prompt as a simple string:
274
256
ai :
275
257
agent :
276
258
my_agent :
277
- model :
278
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
279
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
259
+ model : ' gpt-4o-mini'
280
260
prompt : ' You are a helpful assistant.'
281
261
282
262
**Advanced Configuration **
@@ -288,9 +268,7 @@ For more control, such as including tool definitions in the system prompt, use t
288
268
ai :
289
269
agent :
290
270
my_agent :
291
- model :
292
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
293
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
271
+ model : ' gpt-4o-mini'
294
272
prompt :
295
273
text : ' You are a helpful assistant that can answer questions.'
296
274
include_tools : true # Include tool definitions at the end of the system prompt
@@ -317,9 +295,7 @@ Then configure the prompt with translation enabled:
317
295
ai :
318
296
agent :
319
297
my_agent :
320
- model :
321
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
322
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
298
+ model : ' gpt-4o-mini'
323
299
prompt :
324
300
text : ' agent.system_prompt' # Translation key
325
301
enable_translation : true
@@ -342,9 +318,7 @@ The simplest way to add memory is to provide a string that will be used as stati
342
318
ai :
343
319
agent :
344
320
my_agent :
345
- model :
346
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
347
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
321
+ model : ' gpt-4o-mini'
348
322
memory : ' You have access to user preferences and conversation history'
349
323
prompt :
350
324
text : ' You are a helpful assistant.'
@@ -361,9 +335,7 @@ Use the array syntax with a ``service`` key to explicitly reference a service:
361
335
ai :
362
336
agent :
363
337
my_agent :
364
- model :
365
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
366
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
338
+ model : ' gpt-4o-mini'
367
339
memory :
368
340
service : ' my_memory_service' # Explicitly references an existing service
369
341
prompt :
@@ -382,14 +354,12 @@ Memory can work independently or alongside the system prompt:
382
354
agent :
383
355
# Agent with memory only (memory becomes system prompt)
384
356
memory_only_agent :
385
- model :
386
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
357
+ model : ' gpt-4o-mini'
387
358
memory : ' You are a helpful assistant with conversation history'
388
-
359
+
389
360
# Agent with both memory and prompt (memory prepended to prompt)
390
361
memory_and_prompt_agent :
391
- model :
392
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
362
+ model : ' gpt-4o-mini'
393
363
memory : ' Previous conversation context...'
394
364
prompt :
395
365
text : ' You are a helpful assistant.'
@@ -756,9 +726,7 @@ To disable token usage tracking for an agent, set the ``track_token_usage`` opti
756
726
agent :
757
727
my_agent :
758
728
track_token_usage : false
759
- model :
760
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Gpt'
761
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Gpt::GPT_4O_MINI
729
+ model : ' gpt-4o-mini'
762
730
763
731
Vectorizers
764
732
-----------
@@ -777,22 +745,17 @@ Vectorizers are defined in the ``vectorizer`` section of your configuration:
777
745
openai_small :
778
746
platform : ' ai.platform.openai'
779
747
model :
780
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Embeddings'
781
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Embeddings::TEXT_EMBEDDING_3_SMALL
748
+ name : ' text-embedding-3-small'
782
749
options :
783
750
dimensions : 512
784
751
785
752
openai_large :
786
753
platform : ' ai.platform.openai'
787
- model :
788
- class : ' Symfony\AI\Platform\Bridge\OpenAi\Embeddings'
789
- name : !php/const Symfony\AI\Platform\Bridge\OpenAi\Embeddings::TEXT_EMBEDDING_3_LARGE
754
+ model : ' text-embedding-3-large'
790
755
791
756
mistral_embed :
792
757
platform : ' ai.platform.mistral'
793
- model :
794
- class : ' Symfony\AI\Platform\Bridge\Mistral\Embeddings'
795
- name : !php/const Symfony\AI\Platform\Bridge\Mistral\Embeddings::MISTRAL_EMBED
758
+ model : ' mistral-embed'
796
759
797
760
**Using Vectorizers in Indexers **
798
761
0 commit comments