mindnet/README.md

40 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
# mindnet API (bundle)
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
This bundle provides a minimal FastAPI app for embeddings and Qdrant upserts/queries plus a Markdown importer.
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
## Quick start
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
# 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
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
# Run API
uvicorn app.main:app --host 0.0.0.0 --port 8001 --workers 1
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
# (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
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
- `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
2025-09-01 13:28:59 +02:00
2025-09-02 10:20:51 +02:00
See `scripts/quick_test.sh` for a runnable example.
2025-12-07 12:43:20 +01:00
>Anmerkung:
Diese Datei ist veraltet