协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
local-mode【开发与工程】Use qdrant-client local in-memory and persistent stores for safe prototyping, local vector tests, filtering, sparse/named/multivector queries, persistence, locks, and migration boundaries.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about running Qdrant through qdrant-client without a Qdrant server: QdrantClient(":memory:") for ephemeral tests or QdrantClient(path=...) for a persistent local store.
../client-operations/ for general collection, point, query, scroll, delete, batch, and CRUD method coverage that applies to both local and remote clients.../connection-and-transport/ for server URLs, Cloud API keys, REST/gRPC transport, compatibility checks, TLS, timeouts, and raw transport clients.../async-client/ for AsyncQdrantClient(":memory:") or async local usage.../inference/ for FastEmbed, local model downloads, models.Document, GPU inference extras, and Cloud inference.from qdrant_client import QdrantClient, models
client = QdrantClient(":memory:")
client.create_collection(
"demo",
vectors_config=models.VectorParams(size=4, distance=models.Distance.COSINE),
)
client.upsert(
"demo",
points=[models.PointStruct(id=1, vector=[1.0, 0.0, 0.0, 0.0], payload={"tag": "local"})],
)
hits = client.query_points("demo", query=[1.0, 0.0, 0.0, 0.0], limit=1).points
assert hits[0].id == 1
client.close()
For a deterministic validation script after installing qdrant-client, run:
python sub-skills/local-mode/scripts/local_mode_smoke.py --mode memory
python sub-skills/local-mode/scripts/local_mode_smoke.py --mode persistent
references/local-mode.md for in-memory and persistent recipes, named dense/sparse/multivector examples, payload filtering, score thresholds, and migration guidance.references/troubleshooting.md for lock errors, large local collections, unsupported local raw clients, closed instances, vector mismatches, and persistence surprises.scripts/local_mode_smoke.py for a safe smoke helper that exercises local dense, sparse, multivector, fusion, filtering, persistence, and locking behavior.