Chunk #650
Aus: AI-Services (Index: 15)
114
Tokens
Synced
Status
Taxonomie
| Kategorie | Api |
|---|---|
| Pfad | Api > Services |
| Heading-Pfad | AI-Services > AI Services > ChatService > Code-Beispiel |
Inhalt
use Infrastructure\AI\AIConfig;
// Mit Factory (empfohlen)
$config = AIConfig::fromCredentialsFile();
$chat = $config->createChatService();
$result = $chat->chat(
question: 'Was ist systemisches Coaching?',
model: 'anthropic',
collection: 'documents',
limit: 5
);
echo $result['answer'];
echo "Chunks: " . $result['chunks_used'];
foreach ($result['sources'] as $source) {
echo $source['title'] . " (Score: " . $source['score'] . ")";
}Clean Content
```
`use Infrastructure\AI\AIConfig;
// Mit Factory (empfohlen)
$config = AIConfig::fromCredentialsFile();
$chat = $config->createChatService();
$result = $chat->chat(
question: 'Was ist systemisches Coaching?',
model: 'anthropic',
collection: 'documents',
limit: 5
);
echo $result['answer'];
echo "Chunks: " . $result['chunks_used'];
foreach ($result['sources'] as $source) {
echo $source['title'] . " (Score: " . $source['score'] . ")";
}`
```
Metadaten
| Analysiert am | 20.12.2025 12:49:00 |
|---|---|
| Analyse-Modell | gemma3:4b-it-qat |
| Embedding-Modell | mxbai-embed-large |
| Qdrant-ID | 62a6027d-7903-4839-96a9-66cf224fd2df |
| Erstellt | 20.12.2025 12:34:42 |
| Aktualisiert | 20.12.2025 12:53:41 |