Add Ollama configuration for English coach
This commit is contained in:
24
README.md
24
README.md
@@ -78,6 +78,26 @@ Abhaengigkeiten installieren:
|
||||
npm install
|
||||
```
|
||||
|
||||
Optionale lokale KI-Konfiguration anlegen:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
In `.env` kannst du dein Ollama-Modell eintragen:
|
||||
|
||||
```text
|
||||
EXPO_PUBLIC_OLLAMA_BASE_URL=http://localhost:11434
|
||||
EXPO_PUBLIC_OLLAMA_MODEL=llama3.2
|
||||
```
|
||||
|
||||
Wenn du die App auf einem echten Smartphone mit Expo Go testest, ist `localhost` das Smartphone selbst. Nutze dann die IP deines PCs, zum Beispiel:
|
||||
|
||||
```text
|
||||
EXPO_PUBLIC_OLLAMA_BASE_URL=http://192.168.10.102:11434
|
||||
EXPO_PUBLIC_OLLAMA_MODEL=qwen2.5:7b
|
||||
```
|
||||
|
||||
App starten:
|
||||
|
||||
```bash
|
||||
@@ -98,9 +118,9 @@ npm run web
|
||||
|
||||
Hinweis: Fuer lokale iOS-Simulator-Builds wird macOS mit Xcode benoetigt. Mit Expo Go kann die App auf einem echten Geraet getestet werden.
|
||||
|
||||
## Ollama Integration Geplant
|
||||
## Ollama Integration
|
||||
|
||||
Der aktuelle Chat nutzt `src/services/mockAiCoach.ts`. Dieser Service ist die vorgesehene Stelle, um spaeter einen echten KI-Client zu integrieren.
|
||||
Der Chat nutzt `src/services/ollamaClient.ts` fuer echte lokale KI-Antworten. Falls Ollama nicht erreichbar ist, faellt `src/services/mockAiCoach.ts` automatisch auf Beispielantworten zurueck. Die Modell-Konfiguration liegt in `src/config/ai.ts` und liest Werte aus `.env`.
|
||||
|
||||
Moeglicher lokaler Ablauf:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user