From 0cac795721bd908dac546d002362b2198b3991e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B4=D0=B5=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A1=D0=B0?= =?UTF-8?q?=D1=82=D1=82=D0=B0=D1=80=D0=BE=D0=B2=D0=B0?= Date: Mon, 1 Jun 2026 16:48:17 +0000 Subject: [PATCH] add agent --- agent.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 agent.py diff --git a/agent.py b/agent.py new file mode 100644 index 0000000..33168a0 --- /dev/null +++ b/agent.py @@ -0,0 +1,9 @@ +from langchain.agents import initialize_agent, AgentType +from langchain.llms.ollama import Ollama +from tools import search_local_kb, web_search + +llm = Ollama(model="llama3") + +tools=[search_local_kb,web_search] +agent=initialize_agent(tools,llm,agent_type=AgentType.OPENAI_FUNCTIONS,verbose=True) +print("Agent ready") \ No newline at end of file