diff --git a/api/container.py b/api/container.py index d9a6a5b8..4d9d92aa 100644 --- a/api/container.py +++ b/api/container.py @@ -7,15 +7,11 @@ from typing import Dict, List from fastapi.templating import Jinja2Templates from swarms.agents.workers.agents import AgentManager -from swarms.tools.main import BaseHandler, FileHandler, FileType -from swarms.tools.main import CsvToDataframe +from swarms.utils import BaseHandler, FileHandler, FileType, StaticUploader, CsvToDataframe -from swarms.tools.main import BaseToolSet -from swarms.tools.main import ExitConversation, RequestsGet -from swarms.tools.main import CodeEditor +from swarms.tools.main import BaseToolSet, ExitConversation, RequestsGet, CodeEditor, Terminal -from swarms.tools.main import Terminal -from swarms.tools.main import StaticUploader +from env import settings BASE_DIR = Path(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) diff --git a/swarms/tools/main.py b/swarms/tools/main.py index fa112730..f9ce48b3 100644 --- a/swarms/tools/main.py +++ b/swarms/tools/main.py @@ -435,7 +435,7 @@ import time from datetime import datetime from typing import Dict, List -from ansi import ANSI, Color, Style +from swarms.utils import ANSI, Color, Style diff --git a/swarms/utils/__init__.py b/swarms/utils/__init__.py index c98f8253..aaa41159 100644 --- a/swarms/utils/__init__.py +++ b/swarms/utils/__init__.py @@ -1,2 +1,3 @@ from swarms.utils.ansi import Code, Color, Style, ANSI, dim_multiline -from swarms.utils.logger import logger \ No newline at end of file +from swarms.utils.logger import logger +from swarms.utils.utils import FileType, AbstractUploader, StaticUploader, BaseHandler, FileHandler, CsvToDataframe \ No newline at end of file diff --git a/swarms/utils/utils.py b/swarms/utils/utils.py index 10f40cc4..5845974b 100644 --- a/swarms/utils/utils.py +++ b/swarms/utils/utils.py @@ -408,7 +408,7 @@ class FileHandler: #############===========================> import pandas as pd -from core.prompts.file import DATAFRAME_PROMPT +from swarms.prompts.prompts import DATAFRAME_PROMPT class CsvToDataframe(BaseHandler): @@ -435,7 +435,8 @@ import torch from PIL import Image from transformers import BlipForConditionalGeneration, BlipProcessor -from core.prompts.file import IMAGE_PROMPT +# from core.prompts.file import IMAGE_PROMPT +from swarms.prompts.prompts import IMAGE_PROMPT @@ -535,32 +536,32 @@ def get_token_ids_for_choose_model(model_name): -################# MultiAgent +# ################# MultiAgent -from autogpt.agent import Agent -from swarms.agents.swarms import worker_node +# from autogpt.agent import Agent +# from swarms.agents.swarms import worker_node -class MultiAgent(worker_node): +# class MultiAgent(worker_node): - def __init__( - self, - ai_name, - memory, - full_message_history, - prompt, - user_input, - agent_id - ): - super().__init__( - ai_name=ai_name, - memory=memory, - full_message_history=full_message_history, - next_action_count=0, - prompt=prompt, - user_input=user_input, - ) - self.agent_id = agent_id - self.auditory_buffer = [] # contains the non processed parts of the conversation +# def __init__( +# self, +# ai_name, +# memory, +# full_message_history, +# prompt, +# user_input, +# agent_id +# ): +# super().__init__( +# ai_name=ai_name, +# memory=memory, +# full_message_history=full_message_history, +# next_action_count=0, +# prompt=prompt, +# user_input=user_input, +# ) +# self.agent_id = agent_id +# self.auditory_buffer = [] # contains the non processed parts of the conversation - def receive_message(self, speaker, message): - self.auditory_buffer.append((speaker.ai_name, message)) \ No newline at end of file +# def receive_message(self, speaker, message): +# self.auditory_buffer.append((speaker.ai_name, message)) \ No newline at end of file