From 31591daa800d48ba3146e62cb74b128b6f75960c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D0=B0=D1=82=20=D0=A4=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2?= Date: Fri, 15 May 2026 08:48:21 +0000 Subject: [PATCH] add file --- vector_store.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vector_store.py b/vector_store.py index 65a2652..a3f8b04 100644 --- a/vector_store.py +++ b/vector_store.py @@ -1,14 +1,10 @@ -from langchain_qdrant import QdrantVectorStore +from langchain_community.vectorstores import Chroma from langchain_ollama import OllamaEmbeddings from langchain.schema import Document -class QdrantStore: - def __init__(self, host="localhost", port=6333, collection_name="rag_collection"): - self.client = QdrantVectorStore( - url=f"http://{host}:{port}", - collection_name=collection_name, - embeddings=OllamaEmbeddings(model="nomic-embed-text") - ) +class ChromaStore: + def __init__(self, collection_name="rag_collection"): + self.client = Chroma(embedding_function=OllamaEmbeddings(model="nomic-embed-text"), collection_name=collection_name) # ensure collection exists if not self.client.collection_exists: self.client.create_collection()