MASSIVE CLEAN UP

Former-commit-id: aa3bd5915f
pull/47/head
Kye 1 year ago
parent eb4282ca45
commit 09fbaf0f29

@ -1,7 +1,16 @@
from pydantic import ValidationError
import logging
import os
import faiss
from langchain import LLMChain, OpenAI, PromptTemplate
from langchain.agents import AgentExecutor, Tool, ZeroShotAgent
from langchain.docstore import InMemoryDocstore
from langchain.embeddings import OpenAIEmbeddings
from langchain.experimental import BabyAGI
from langchain.vectorstores import FAISS
from pydantic import ValidationError
from swarms.agents.tools.agent_tools import *
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

@ -4,6 +4,7 @@ from typing import Optional
import faiss
from langchain import LLMChain, OpenAI, PromptTemplate
from langchain.agents import AgentExecutor, Tool, ZeroShotAgent
from langchain.chains.qa_with_sources.loading import load_qa_with_sources_chain
from langchain.chat_models import ChatOpenAI
from langchain.docstore import InMemoryDocstore
@ -12,9 +13,6 @@ from langchain.tools import DuckDuckGoSearchRun
from langchain.tools.file_management.read import ReadFileTool
from langchain.tools.file_management.write import WriteFileTool
from langchain.vectorstores import FAISS
from langchain.agents import ZeroShotAgent, Tool, AgentExecutor
from swarms.agents.models.hf import HuggingFaceLLM

@ -1,11 +1,30 @@
from swarms.agents.tools.agent_tools import *
import logging
import faiss
from langchain.agents import Tool
from langchain.chains.qa_with_sources.loading import load_qa_with_sources_chain
from langchain.chat_models import ChatOpenAI
from langchain.docstore import InMemoryDocstore
from langchain.embeddings import OpenAIEmbeddings
from langchain.experimental.autonomous_agents.autogpt.agent import AutoGPT
from langchain.memory.chat_message_histories import FileChatMessageHistory
from langchain.tools import DuckDuckGoSearchRun
from langchain.tools.file_management.read import ReadFileTool
from langchain.tools.file_management.write import WriteFileTool
from langchain.vectorstores import FAISS
# from langchain.tools.human.tool import HumanInputRun
from swarms.agents.tools.main import WebpageQATool, process_csv
from swarms.workers.worker_node import WorkerNodeInitializer
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
ROOT_DIR = "./data/"
import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
from swarms.agents.tools.main import Terminal
class WorkerNodeInitializer:
"""Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on"""
@ -100,7 +119,6 @@ class WorkerNode:
ReadFileTool(root_dir=ROOT_DIR),
process_csv,
WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)),
Terminal,
]
if not tools:
logging.error("Tools are not initialized")

Loading…
Cancel
Save