devlopers tools

Former-commit-id: e3837d80d1
group-chat
Kye 1 year ago
parent 0b48341590
commit df328fdd7d

@ -47,7 +47,7 @@ class HierarchicalSwarm:
self.boss_node = BossNode( self.boss_node = BossNode(
api_key=self.openai_api_key, api_key=self.openai_api_key,
# worker_node=self.worker_node, worker_node=self.worker_node,
llm_class=OpenAI, llm_class=OpenAI,
max_iterations=self.max_iterations, max_iterations=self.max_iterations,
verbose=self.verbose verbose=self.verbose

@ -6,18 +6,28 @@ from langchain.agents import Tool
from langchain.chat_models import ChatOpenAI from langchain.chat_models import ChatOpenAI
from langchain.docstore import InMemoryDocstore from langchain.docstore import InMemoryDocstore
from langchain.embeddings import OpenAIEmbeddings from langchain.embeddings import OpenAIEmbeddings
from langchain_experimental.autonomous_agents import AutoGPT
from langchain.vectorstores import FAISS from langchain.vectorstores import FAISS
from langchain_experimental.autonomous_agents import AutoGPT
from swarms.agents.tools.autogpt import ( from swarms.agents.tools.autogpt import (
DuckDuckGoSearchRun,
FileChatMessageHistory, FileChatMessageHistory,
ReadFileTool, ReadFileTool,
WebpageQATool, WebpageQATool,
WriteFileTool, WriteFileTool,
DuckDuckGoSearchRun,
load_qa_with_sources_chain, load_qa_with_sources_chain,
process_csv, process_csv,
web_search, web_search,
) )
from swarms.agents.tools.developer import (
code_editor_append,
code_editor_delete,
code_editor_patch,
code_editor_read,
code_editor_summary,
code_editor_write,
terminal_execute,
)
ROOT_DIR = "./data/" ROOT_DIR = "./data/"
@ -223,6 +233,13 @@ class WorkerNode:
ReadFileTool(root_dir=ROOT_DIR), ReadFileTool(root_dir=ROOT_DIR),
process_csv, process_csv,
WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)), WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)),
code_editor_append,
code_editor_delete,
code_editor_patch,
code_editor_read,
code_editor_summary,
code_editor_write,
terminal_execute,
] ]
if not tools: if not tools:
logging.error("Tools are not initialized") logging.error("Tools are not initialized")

Loading…
Cancel
Save