main
Kye 2 years ago
parent 55e07625a6
commit 13185b19d2

@ -58,24 +58,19 @@ query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm))
web_search = DuckDuckGoSearchRun() web_search = DuckDuckGoSearchRun()
tools = [ tools = {
'web_search': web_search,
web_search, 'write_file_tool': WriteFileTool(root_dir="./data"),
WriteFileTool(root_dir="./data"), 'read_file_tool': ReadFileTool(root_dir="./data"),
ReadFileTool(root_dir="./data"), 'process_csv': process_csv,
# 'multimodal_agent_tool': multimodal_agent_tool,
process_csv, 'query_website_tool': query_website_tool,
# multimodal_agent_tool, 'terminal': Terminal,
query_website_tool, 'code_writer': CodeWriter,
'code_editor': CodeEditor,
Terminal, # 'math_tool': math_tool
CodeWriter,
CodeEditor,
# math_tool
# HumanInputRun(), # Activate if you want the permit asking for help from the human # HumanInputRun(), # Activate if you want the permit asking for help from the human
] }
############## Vectorstore ############## Vectorstore
@ -228,14 +223,20 @@ class Swarms:
def initialize_tools(self, llm): def initialize_tools(self, llm):
web_search = DuckDuckGoSearchRun() web_search = DuckDuckGoSearchRun()
tools = [web_search, WriteFileTool(root_dir="./data"), ReadFileTool(root_dir="./data"), process_csv, tools = {
# multimodal_agent_tool, 'web_search': web_search,
WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)), 'write_file_tool': WriteFileTool(root_dir="./data"),
Terminal, CodeWriter, CodeEditor, 'read_file_tool': ReadFileTool(root_dir="./data"),
# math_tool 'process_csv': process_csv,
] # 'multimodal_agent_tool': multimodal_agent_tool,
'query_website_tool': WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)),
'terminal': Terminal,
'code_writer': CodeWriter,
'code_editor': CodeEditor,
# 'math_tool': math_tool
}
return tools return tools
def initialize_vectorstore(self): def initialize_vectorstore(self):
embeddings_model = OpenAIEmbeddings() embeddings_model = OpenAIEmbeddings()
embedding_size = 1536 embedding_size = 1536

Loading…
Cancel
Save