from sentence_transformers import SentenceTransformer
from qdrant_client import QdrantClient

# Modell laden
model = SentenceTransformer("all-MiniLM-L6-v2")

# Qdrant-Client initialisieren
qdrant = QdrantClient(host="localhost", port=6333)

# Suchabfrage
query = "Wie wird Mae-geri korrekt ausgeführt?"
query_vector = model.encode(query).tolist()

# Suche durchführen
results = qdrant.search(
    collection_name="karate-doku",
    query_vector=query_vector,
    limit=3
)

# Ergebnisse ausgeben
for r in results:
    print(f"Score: {r.score:.3f} - Text: {r.payload['text']}")

