From 44590f98576954eda57c1bdccb7d23acbf775a23 Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 5 Jul 2023 16:45:41 -0400 Subject: [PATCH] clean up tools --- swarms/swarms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swarms/swarms.py b/swarms/swarms.py index 7e1897e5..37caff7f 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -28,6 +28,8 @@ from swarms.tools import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQ from langchain.experimental.autonomous_agents.autogpt.agent import AutoGPT from langchain.chat_models import ChatOpenAI +from langchain.tools import tool + # ---------- Constants ---------- ROOT_DIR = "./data/" @@ -56,6 +58,7 @@ index = faiss.IndexFlatL2(embedding_size) vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {}) # ---------- Worker Node ---------- +@tool("search", return_direct=True) class WorkerNode: def __init__(self, llm, tools, vectorstore): self.llm = llm