Dateien nach "/" hochladen
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
This commit is contained in:
parent
a024487aae
commit
7730ad9834
51
README.md
51
README.md
|
|
@ -1,32 +1,35 @@
|
|||
# mindnet — Lokales Wissensnetz (Obsidian → Qdrant → LLM)
|
||||
|
||||
**Ziel:** Markdown-Notizen (z. B. aus Obsidian) als Chunks mit Embeddings in **Qdrant** speichern, Notiz-Metadaten separat pflegen und Links/Beziehungen explizit abbilden.
|
||||
**Präfix:** `mindnet_…` (keine Kollision mit bestehenden Trainer-Collections).
|
||||
# mindnet API (bundle)
|
||||
|
||||
## Collections (Qdrant)
|
||||
This bundle provides a minimal FastAPI app for embeddings and Qdrant upserts/queries plus a Markdown importer.
|
||||
|
||||
- **mindnet_chunks**
|
||||
Semantische Suche (RAG) über Text-Chunks (Vektor: 384, Distance: Cosine).
|
||||
**Payload (Auszug):** `note_id`, `chunk_id`, `title`, `path`, `tags[]`, `Typ`, `Rolle[]`, `Status`, `heading`, `text`, `links[]`.
|
||||
|
||||
- **mindnet_notes**
|
||||
1 Punkt pro Notiz (optional Titel-Embedding). Metadaten/Facettierung.
|
||||
|
||||
- **mindnet_edges**
|
||||
Explizite Kanten (A → B) als Payload-Punkte (Dummy-Vektor `size=1`).
|
||||
**Payload:** `src_note_id`, `dst_note_id`, `src_chunk_id`, `dst_chunk_id`, `link_text`, `relation`.
|
||||
|
||||
## Schnellstart
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python3 -m venv .venv && source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Qdrant-URL per ENV (optional), sonst Default:
|
||||
# export QDRANT_URL=http://127.0.0.1:6333
|
||||
# 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
|
||||
|
||||
python scripts/setup_collections.py \
|
||||
--prefix mindnet \
|
||||
--dim 384 \
|
||||
--distance Cosine
|
||||
# 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.
|
||||
|
|
|
|||
9
requirements.txt
Normal file
9
requirements.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
fastapi
|
||||
uvicorn[standard]
|
||||
qdrant-client
|
||||
sentence-transformers
|
||||
torch
|
||||
python-frontmatter
|
||||
tqdm
|
||||
requests
|
||||
Loading…
Reference in New Issue
Block a user