From a88403b68e9b08bf3c4d149abf8f984b5adde0a5 Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 5 Jul 2023 15:56:44 -0400 Subject: [PATCH] clean up --- swarms/swarms.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index 3c6836ea..ce11d216 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -59,17 +59,16 @@ web_search = DuckDuckGoSearchRun() tools = [ - Tool(name='web_search', func=web_search.run, description='Runs a web search'), - Tool(name='write_file_tool', func=WriteFileTool(root_dir="./data").run, description='Writes a file'), - Tool(name='read_file_tool', func=ReadFileTool(root_dir="./data").run, description='Reads a file'), - Tool(name='process_csv', func=process_csv.run, description='Processes a CSV file'), - Tool(name='query_website_tool', func=query_website_tool.run, description='Queries a website'), - Tool(name='terminal', func=Terminal.run, description='Operates a terminal'), - Tool(name='code_writer', func=CodeWriter.run, description='Writes code'), - Tool(name='code_editor', func=CodeEditor.run, description='Edits code'), - # Add any additional tools here... + Tool(name='web_search', func=web_search, description='Runs a web search'), + Tool(name='write_file_tool', func=WriteFileTool(root_dir="./data"), description='Writes a file'), + Tool(name='read_file_tool', func=ReadFileTool(root_dir="./data"), description='Reads a file'), + Tool(name='process_csv', func=process_csv, description='Processes a CSV file'), + Tool(name='query_website_tool', func=query_website_tool, description='Queries a website'), + 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'), +# Add any additional tools here... ] - ############## Vectorstore embeddings_model = OpenAIEmbeddings() embedding_size = 1536 @@ -232,7 +231,7 @@ class Swarms: Tool(name='read_file_tool', func=ReadFileTool(root_dir="./data"), description='Reads a file'), Tool(name='process_csv', func=process_csv, description='Processes a CSV file'), Tool(name='query_website_tool', func=query_website_tool, description='Queries a website'), - Tool(name='terminal', func=Terminal, description='Operates a terminal'), + 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'), # Add any additional tools here...