Chunk #640
Aus: AI-Services (Index: 5)
112
Tokens
Synced
Status
Taxonomie
| Kategorie | AI-Services |
|---|---|
| Pfad | AI-Services > OllamaService > Embedding/Generation |
| Heading-Pfad | AI-Services > AI Services > OllamaService > Code-Beispiel |
Entities
| Name | Typ |
|---|---|
| OllamaService | SERVICE |
| Ollama | TECHNOLOGY |
| Embedding | CONCEPT |
| Text Generation | CONCEPT |
| Health Check | COMMAND |
Keywords
Inhalt
use Infrastructure\AI\OllamaService;
$ollama = new OllamaService('http://localhost:11434');
// Embedding erstellen
$embedding = $ollama->getEmbedding('Hello World');
// Returns: [0.123, -0.456, 0.789, ...] (1024 floats)
// Text generieren
$response = $ollama->generate('Explain quantum computing.');
// Returns: "Quantum computing is a type of computing that..."
// Health Check
if ($ollama->isAvailable()) {
echo "Ollama läuft";
}Clean Content
```
`use Infrastructure\AI\OllamaService;
$ollama = new OllamaService('http://localhost:11434');
// Embedding erstellen
$embedding = $ollama->getEmbedding('Hello World');
// Returns: [0.123, -0.456, 0.789, ...] (1024 floats)
// Text generieren
$response = $ollama->generate('Explain quantum computing.');
// Returns: "Quantum computing is a type of computing that..."
// Health Check
if ($ollama->isAvailable()) {
echo "Ollama läuft";
}`
```
Metadaten
| Analysiert am | 20.12.2025 12:48:30 |
|---|---|
| Analyse-Modell | gemma3:4b-it-qat |
| Embedding-Modell | mxbai-embed-large |
| Qdrant-ID | d3c7c9e6-ca98-4fb4-91e8-73b6f604fdc0 |
| Erstellt | 20.12.2025 12:34:42 |
| Aktualisiert | 20.12.2025 12:53:41 |