main
Kye 2 years ago
parent aaebb694a5
commit 9246afae0b

@ -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__))))

@ -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

@ -1,2 +1,3 @@
from swarms.utils.ansi import Code, Color, Style, ANSI, dim_multiline
from swarms.utils.logger import logger
from swarms.utils.logger import logger
from swarms.utils.utils import FileType, AbstractUploader, StaticUploader, BaseHandler, FileHandler, CsvToDataframe

@ -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))
# def receive_message(self, speaker, message):
# self.auditory_buffer.append((speaker.ai_name, message))
Loading…
Cancel
Save