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