From 804fdf9d1bc15b9407d20db27420bde49a073ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B8=D0=BD=D0=B0=D1=80=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=B8=D1=82=D0=BE=D0=B2?= Date: Wed, 17 Jun 2026 13:10:02 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20vectorstore.py:=20remove=20agent.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 agent.py diff --git a/agent.py b/agent.py deleted file mode 100644 index 7900644..0000000 --- a/agent.py +++ /dev/null @@ -1,28 +0,0 @@ -from langchain.agents import create_agent -from langchain_ollama import ChatOllama - -from tools import search_local_kb, web_search - -OLLAMA_BASE_URL = "http://127.0.0.1:11434" -LLM_MODEL = "llama3" - -SYSTEM_PROMPT = """ -You are a RAG assistant that must choose the best source before answering. - -Rules: -- Use search_local_kb for questions about local notes, internal documents, course materials, or any topic that may already exist in the local knowledge base. -- Use web_search for current events, recent news, live facts, or questions that clearly require the internet. -- Do not call both tools unless the first one clearly failed to provide enough information. -- Every final answer must end with a separate line in the exact format: "Источник: chromadb" or "Источник: tavily". -- Answer in Russian. -""" - -agent = create_agent( - model=ChatOllama( - model=LLM_MODEL, - base_url=OLLAMA_BASE_URL, - temperature=0, - ), - tools=[search_local_kb, web_search], - system_prompt=SYSTEM_PROMPT, -)