From 196d933aefd2966512feef11d4c962f09172c3fd Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 7 Jul 2023 16:50:23 -0400 Subject: [PATCH] requests get test --- swarms/swarms.py | 13 ++++++------- swarms/tools/agent_tools.py | 23 ----------------------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index 3f4cf1d7..2ff37950 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -1,12 +1,9 @@ +import logging + from swarms.tools.agent_tools import * -from swarms.agents.workers.worker import WorkerNode +from swarms.agents.workers.worker import WorkerNode, worker_tool from swarms.agents.boss.boss_agent import BossNode -# from swarms.agents.workers.omni_worker import OmniWorkerAgent -# from swarms.tools.main import RequestsGet, ExitConversation -# visual agent - -from swarms.agents.workers.worker import worker_tool -import logging +from swarms.tools.main import RequestsGet logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') @@ -29,6 +26,8 @@ class Swarms: process_csv, WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)), + + RequestsGet() # CodeEditor, # Terminal, diff --git a/swarms/tools/agent_tools.py b/swarms/tools/agent_tools.py index 47213501..02673df7 100644 --- a/swarms/tools/agent_tools.py +++ b/swarms/tools/agent_tools.py @@ -34,26 +34,3 @@ from langchain.tools import tool # ---------- Constants ---------- ROOT_DIR = "./data/" - -# ---------- Tools ---------- -# openai_api_key = os.environ["OPENAI_API_KEY"] -# llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key=openai_api_key) - -# worker_tools = [ -# DuckDuckGoSearchRun(), -# WriteFileTool(root_dir=ROOT_DIR), -# ReadFileTool(root_dir=ROOT_DIR), -# process_csv, - -# WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)), - -# # Tool(name='terminal', func=Terminal.execute, description='Operates a terminal'), -# # Tool(name='code_writer', func=CodeWriter(), description='Writes code'), -# # Tool(name='code_editor', func=CodeEditor(), description='Edits code'),# -# ] - -# # ---------- Vector Store ---------- -# embeddings_model = OpenAIEmbeddings() -# embedding_size = 1536 -# index = faiss.IndexFlatL2(embedding_size) -# vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {}) \ No newline at end of file