diff --git a/app/routers/admin_vectors.py b/app/routers/admin_vectors.py index 43dcefa..5b5dc83 100644 --- a/app/routers/admin_vectors.py +++ b/app/routers/admin_vectors.py @@ -56,13 +56,13 @@ def search_vectors( query_vector = embedding_service.embed_texts([query])[0] # 2. Search Qdrant directly - results = qdrant_client.search( + results = qdrant_client.query_points( collection_name=collection, - query_vector=query_vector, + query=query_vector, limit=limit, with_payload=True, with_vectors=False - ) + ).points # 3. Format formatted = [] @@ -146,6 +146,8 @@ def list_collections(user = Depends(current_user)): client = get_qdrant_client() try: collections = client.get_collections() - return {"collections": [c.name for c in collections.collections]} + # Deduplicate and sort + names = sorted(list(set([c.name for c in collections.collections]))) + return {"collections": names} except Exception as e: return {"error": str(e), "collections": []}