@@ -127,17 +127,19 @@ Advanced Example with multiple agents
127
127
model : ' mistral-embed'
128
128
indexer :
129
129
default :
130
+ loader : ' Symfony\AI\Store\Document\Loader\InMemoryLoader'
130
131
vectorizer : ' ai.vectorizer.openai_embeddings'
131
132
store : ' ai.store.chroma_db.default'
132
133
133
134
research :
135
+ loader : ' Symfony\AI\Store\Document\Loader\TextFileLoader'
134
136
vectorizer : ' ai.vectorizer.mistral_embeddings'
135
137
store : ' ai.store.memory.research'
136
138
137
139
Store Dependency Injection
138
140
--------------------------
139
141
140
- When using multiple stores in your application, the AI Bundle provides flexible dependency injection through store aliases.
142
+ When using multiple stores in your application, the AI Bundle provides flexible dependency injection through store aliases.
141
143
This allows you to inject specific stores into your services without conflicts, even when stores share the same name across different types.
142
144
143
145
For each configured store, the bundle automatically creates two types of aliases:
@@ -174,13 +176,13 @@ You can inject stores into your services using the generated aliases::
174
176
{
175
177
public function __construct(
176
178
private StoreInterface $main, // Uses memory store (first occurrence)
177
- private StoreInterface $chromaDbMain, // Explicitly uses chroma_db store
179
+ private StoreInterface $chromaDbMain, // Explicitly uses chroma_db store
178
180
private StoreInterface $memoryProducts, // Explicitly uses memory products store
179
181
) {
180
182
}
181
183
}
182
184
183
- When multiple stores share the same name (like ``main `` in the example), the simple alias (``$main ``) will reference the first occurrence.
185
+ When multiple stores share the same name (like ``main `` in the example), the simple alias (``$main ``) will reference the first occurrence.
184
186
Use type-prefixed aliases (``$memoryMain ``, ``$chromaDbMain ``) for explicit disambiguation.
185
187
186
188
Model Configuration
@@ -225,7 +227,7 @@ You can also define models for the vectorizer this way:
225
227
HTTP Client Configuration
226
228
-------------------------
227
229
228
- Each platform can be configured with a custom HTTP client service to handle API requests.
230
+ Each platform can be configured with a custom HTTP client service to handle API requests.
229
231
This allows you to customize timeouts, proxy settings, SSL configurations, and other HTTP-specific options.
230
232
231
233
By default, all platforms use the standard Symfony HTTP client service (``http_client ``):
@@ -522,12 +524,12 @@ Configuration
522
524
support :
523
525
# The main orchestrator agent that analyzes requests
524
526
orchestrator : ' orchestrator'
525
-
527
+
526
528
# Handoff rules mapping agents to trigger keywords
527
529
# At least 1 handoff required
528
530
handoffs :
529
531
technical : ['bug', 'problem', 'technical', 'error', 'code', 'debug']
530
-
532
+
531
533
# Fallback agent for unmatched requests (required)
532
534
fallback : ' general'
533
535
@@ -552,12 +554,12 @@ For the example above, the service ``ai.multi_agent.support`` is registered and
552
554
private AgentInterface $supportAgent,
553
555
) {
554
556
}
555
-
557
+
556
558
public function askSupport(string $question): string
557
559
{
558
560
$messages = new MessageBag(Message::ofUser($question));
559
561
$response = $this->supportAgent->call($messages);
560
-
562
+
561
563
return $response->getContent();
562
564
}
563
565
}
@@ -851,14 +853,17 @@ Once configured, vectorizers can be referenced by name in indexer configurations
851
853
ai :
852
854
indexer :
853
855
documents :
856
+ loader : ' Symfony\AI\Store\Document\Loader\TextFileLoader'
854
857
vectorizer : ' ai.vectorizer.openai_small'
855
858
store : ' ai.store.chroma_db.documents'
856
859
857
860
research :
861
+ loader : ' Symfony\AI\Store\Document\Loader\TextFileLoader'
858
862
vectorizer : ' ai.vectorizer.openai_large'
859
863
store : ' ai.store.chroma_db.research'
860
864
861
865
knowledge_base :
866
+ loader : ' Symfony\AI\Store\Document\Loader\InMemoryLoader'
862
867
vectorizer : ' ai.vectorizer.mistral_embed'
863
868
store : ' ai.store.memory.kb'
864
869
0 commit comments