Skip to content

Commit 0d2914e

Browse files
committed
[AI Bundle] Update documentation for indexer
1 parent 0fc7fab commit 0d2914e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/ai-bundle/doc/index.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ Advanced Example with multiple agents
127127
model: 'mistral-embed'
128128
indexer:
129129
default:
130+
loader: 'Symfony\AI\Store\Document\Loader\InMemoryLoader'
130131
vectorizer: 'ai.vectorizer.openai_embeddings'
131132
store: 'ai.store.chroma_db.default'
132133
133134
research:
135+
loader: 'Symfony\AI\Store\Document\Loader\TextFileLoader'
134136
vectorizer: 'ai.vectorizer.mistral_embeddings'
135137
store: 'ai.store.memory.research'
136138
137139
Store Dependency Injection
138140
--------------------------
139141

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.
141143
This allows you to inject specific stores into your services without conflicts, even when stores share the same name across different types.
142144

143145
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::
174176
{
175177
public function __construct(
176178
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
178180
private StoreInterface $memoryProducts, // Explicitly uses memory products store
179181
) {
180182
}
181183
}
182184

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.
184186
Use type-prefixed aliases (``$memoryMain``, ``$chromaDbMain``) for explicit disambiguation.
185187

186188
Model Configuration
@@ -225,7 +227,7 @@ You can also define models for the vectorizer this way:
225227
HTTP Client Configuration
226228
-------------------------
227229

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.
229231
This allows you to customize timeouts, proxy settings, SSL configurations, and other HTTP-specific options.
230232

231233
By default, all platforms use the standard Symfony HTTP client service (``http_client``):
@@ -522,12 +524,12 @@ Configuration
522524
support:
523525
# The main orchestrator agent that analyzes requests
524526
orchestrator: 'orchestrator'
525-
527+
526528
# Handoff rules mapping agents to trigger keywords
527529
# At least 1 handoff required
528530
handoffs:
529531
technical: ['bug', 'problem', 'technical', 'error', 'code', 'debug']
530-
532+
531533
# Fallback agent for unmatched requests (required)
532534
fallback: 'general'
533535
@@ -552,12 +554,12 @@ For the example above, the service ``ai.multi_agent.support`` is registered and
552554
private AgentInterface $supportAgent,
553555
) {
554556
}
555-
557+
556558
public function askSupport(string $question): string
557559
{
558560
$messages = new MessageBag(Message::ofUser($question));
559561
$response = $this->supportAgent->call($messages);
560-
562+
561563
return $response->getContent();
562564
}
563565
}
@@ -851,14 +853,17 @@ Once configured, vectorizers can be referenced by name in indexer configurations
851853
ai:
852854
indexer:
853855
documents:
856+
loader: 'Symfony\AI\Store\Document\Loader\TextFileLoader'
854857
vectorizer: 'ai.vectorizer.openai_small'
855858
store: 'ai.store.chroma_db.documents'
856859
857860
research:
861+
loader: 'Symfony\AI\Store\Document\Loader\TextFileLoader'
858862
vectorizer: 'ai.vectorizer.openai_large'
859863
store: 'ai.store.chroma_db.research'
860864
861865
knowledge_base:
866+
loader: 'Symfony\AI\Store\Document\Loader\InMemoryLoader'
862867
vectorizer: 'ai.vectorizer.mistral_embed'
863868
store: 'ai.store.memory.kb'
864869

0 commit comments

Comments
 (0)