diff --git a/swarms/agents/tools/agent_tools.py b/swarms/agents/tools/agent_tools.py deleted file mode 100644 index baed1f79..00000000 --- a/swarms/agents/tools/agent_tools.py +++ /dev/null @@ -1,12 +0,0 @@ - - -# ---------- Dependencies ---------- - - - - - - - -# ---------- Constants ---------- -ROOT_DIR = "./data/" diff --git a/swarms/orchestrate.py b/swarms/orchestrate.py index ac5da889..f869fc3c 100644 --- a/swarms/orchestrate.py +++ b/swarms/orchestrate.py @@ -48,7 +48,6 @@ from abc import ABC, abstractmethod from typing import List, Dict, Any import threading - from swarms.agents.memory.ocean import OceanDB diff --git a/swarms/swarms.py b/swarms/swarms.py index 3e7c1b21..71c02f08 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -2,8 +2,24 @@ import asyncio import logging from typing import Optional +import faiss +from langchain import LLMChain, OpenAI, PromptTemplate +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.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 -from swarms.agents.tools.agent_tools import * + +# from langchain.tools.human.tool import HumanInputRun +from swarms.agents.tools.main import WebpageQATool, process_csv from swarms.boss.boss_node import BossNodeInitializer as BossNode from swarms.workers.worker_node import WorkerNodeInitializer @@ -17,6 +33,10 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %( # TODO: Add RLHF Data collection, ask user how the swarm is performing # TODO: Create an onboarding process if not settings are preconfigured like `from swarms import Swarm, Swarm()` => then initiate onboarding name your swarm + provide purpose + etc + +# ---------- Constants ---------- +ROOT_DIR = "./data/" + class HierarchicalSwarm: def __init__( self, @@ -242,7 +262,7 @@ def swarm( logging.error("Invalid objective") raise ValueError("A valid objective is required") try: - swarms = HierarchicalSwarm(api_key, model_id=model_type, use_async=False, model_type=model_type, logging_enabled=logging_enabled) # Turn off async + swarms = HierarchicalSwarm(api_key, model_id=model_type, use_async=False, model_type=model_type) #logging_enabled=logging_enabled) # Turn off async result = swarms.run(objective) if result is None: logging.error("Failed to run swarms")