Go to file
Lars d2e0b48aa5
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
Merge pull request 'WP15' (#9) from WP15 into main
Reviewed-on: #9
### MERGE: WP-15 Smart Edge Allocation & Traffic Control (v2.6.0)

**Zusammenfassung:**
Dieses Merge Request schließt das Workpackage WP-15 ab. Die Kernziele – präzisere Kanten-Zuweisung und System-Stabilität unter LLM-Last – wurden erreicht. Die Implementierung der LLM-basierten Smart Edges ist damit produktionsreif.

**Kern-Features:**
1.  **Smart Edge Allocation:** Kanten werden nun LLM-geprüft und nur an die spezifischen Chunks gebunden, in denen der verlinkte Inhalt relevant ist. Das reduziert "Beifang" im Retrieval und erhöht die Präzision.
    * Steuerung: Über `types.yaml` (`enable_smart_edge_allocation`).
2.  **Traffic Control & Resilienz:** Der `LLMService` implementiert Prioritäts-Warteschlangen (`priority="realtime"` vs. `"background"`).
    * **Ergebnis:** Chat-Anfragen haben Vorfahrt und das System stürzt während rechenintensiver Importe nicht mehr mit Timeouts ab. Die Parallelität des Imports ist über `MINDNET_LLM_BACKGROUND_LIMIT` konfigurierbar.
3.  **UI Robustheit:** Der "Healing Parser" im Frontend (`ui.py`) repariert automatisch kaputte YAML-Frontmatter in LLM-generierten Drafts.

**Betroffene Komponenten:**
* `app/services/llm_service.py` (Traffic Control / Semaphore)
* `app/core/chunker.py` / `app/services/semantic_analyzer.py` (Smart Edge Logik / Retry)
* `app/routers/chat.py` (Hybrid Router v5 / Question Detection)
* `app/frontend/ui.py` (Healing Parser / API-Timeouts)
* `config/types.yaml` (Neue Profile & Smart Edge Flag)

**Aktionen nach Merge:**
* **Admins:** `MINDNET_LLM_BACKGROUND_LIMIT` in der Produktions-.env prüfen und ggf. anpassen.
* **Initialisierung:** Bei Änderung der Chunking-Profile ist ein Full Rebuild notwendig.
2025-12-13 06:39:48 +01:00
.gitea/workflows .gitea/workflows/deploy.yml aktualisiert 2025-11-07 09:37:02 +01:00
.vscode Neue Dokumentationsdateien 2025-12-07 15:49:44 +01:00
app Frage wird durch ? oder Fragewort identifiziert 2025-12-12 21:56:17 +01:00
config bug fix 2025-12-12 18:10:26 +01:00
docker docker/embeddings.Dockerfile aktualisiert 2025-09-04 08:00:52 +02:00
docs Doku Update 2025-12-13 06:37:24 +01:00
Programmmanagement dokumentation WP15 2025-12-12 22:54:59 +01:00
schemas schemas/note.schema.json aktualisiert 2025-09-09 19:43:12 +02:00
scripts logging für import_markdown 2025-12-12 13:26:31 +01:00
tests test script 2025-12-12 15:03:20 +01:00
vault vault/leitbild/templates/obsidian_review_daily.md hinzugefügt 2025-11-01 15:08:47 +01:00
vault_master/leitbild2025 vault 2025-12-11 22:29:03 +01:00
README.md test 2025-12-07 12:43:20 +01:00
requirements.txt Erste Version Wp10 2025-12-09 18:44:26 +01:00

mindnet API (bundle)

This bundle provides a minimal FastAPI app for embeddings and Qdrant upserts/queries plus a Markdown importer.

Quick start

python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Environment (adjust as needed)
export QDRANT_URL=http://127.0.0.1:6333
export MINDNET_PREFIX=mindnet
export MINDNET_MODEL=sentence-transformers/all-MiniLM-L6-v2

# Run API
uvicorn app.main:app --host 0.0.0.0 --port 8001 --workers 1

# (optional) Ensure collections exist (or use setup_mindnet_collections.py you already have)
# python3 scripts/setup_mindnet_collections.py --qdrant-url $QDRANT_URL --prefix $MINDNET_PREFIX --dim 384 --distance Cosine

# Import some notes
python3 scripts/import_markdown.py --vault /path/to/Obsidian

Endpoints

  • POST /embed{ "texts": [...] } → 384-d vectors
  • POST /qdrant/upsert_note
  • POST /qdrant/upsert_chunk
  • POST /qdrant/upsert_edge
  • POST /qdrant/query → semantic search over chunks with optional filters

See scripts/quick_test.sh for a runnable example.

Anmerkung: Diese Datei ist veraltet