From 7f446cd9c001540ca84cd389f394dedcd2f4a640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=B8=D0=BB=20=D0=92=D0=B8=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=BE=D0=B2?= Date: Thu, 2 Jul 2026 09:38:30 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20utils.py=20=E2=80=94=20=D0=90=D0=B3?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=20=D1=81=20RAG-=D0=BF=D0=B0=D0=BC=D1=8F?= =?UTF-8?q?=D1=82=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 utils.py diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..078b764 --- /dev/null +++ b/utils.py @@ -0,0 +1,13 @@ +from langchain_ollama import OllamaEmbeddings, Ollama +from langchain_qdrant import QdrantVectorStore +from langchain_text_splitters import RecursiveCharacterTextSplitter +from langchain_core.documents import Document + +embeddings = OllamaEmbeddings(model="nomic-embed-text") +llm = Ollama(model="llama3", temperature=0.0) +vector_store = QdrantVectorStore( + embedding_function=embeddings, + url="http://localhost:6333", + collection_name="knowledge", +) +splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) \ No newline at end of file