From f1c1b7e9ca0b5283d1c66c0bbfdc9b1a8421f40f Mon Sep 17 00:00:00 2001 From: lonpatovaadelina Date: Wed, 3 Jun 2026 09:01:06 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0:=201.=20=D0=92=20vectorstore.py=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=D1=82=D1=8C=20=D0=B8=D0=BC=D0=BF=D0=BE?= =?UTF-8?q?=D1=80=D1=82=20Ollama=20=D0=BD=D0=B0=20from=20langchain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vectorstore.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vectorstore.py b/vectorstore.py index b1b41de..572bb76 100644 --- a/vectorstore.py +++ b/vectorstore.py @@ -2,13 +2,12 @@ import os from pathlib import Path from typing import List -from langchain_ollama import OllamaEmbeddings +from langchain_ollama import OllamaEmbeddings, OllamaLLM from langchain_chroma import Chroma from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain.docstore.document import Document from langchain_tavily import TavilySearchResults from langchain.agents import Tool, AgentExecutor, initialize_agent -from langchain.llms import Ollama from dotenv import load_dotenv # Загрузка переменных окружения из .env @@ -103,7 +102,7 @@ def create_agent(vectorstore: Chroma) -> AgentExecutor: ) ] - llm = Ollama(model="llama3") + llm = OllamaLLM(model="llama3") agent_executor = initialize_agent( tools, llm,