[CODE FORMATTING]

pull/704/head
Kye Gomez 2 weeks ago
parent b53cd15c24
commit da3f12905d

@ -1,4 +1,3 @@
import os
from dotenv import load_dotenv
from swarm_models import OpenAIChat

@ -201,8 +201,8 @@ blackstone_market_analysis = AgentRearrange(
)
swarm_arrange = SwarmRearrange(
name = "Blackstone-Swarm",
description = "A swarm that processes tasks concurrently using multiple agents and rearranges the flow based on the task requirements.",
name="Blackstone-Swarm",
description="A swarm that processes tasks concurrently using multiple agents and rearranges the flow based on the task requirements.",
swarms=[
blackstone_acquisition_analysis,
blackstone_investment_strategy,

@ -17,7 +17,7 @@ from swarms.structs.groupchat import (
ChatHistory,
ChatTurn,
AgentResponse,
expertise_based
expertise_based,
)
from swarms.structs.majority_voting import (
MajorityVoting,

@ -24,6 +24,7 @@ uuid_hex = uuid.uuid4().hex
formatted_time = datetime.datetime.now().strftime("%Y-%m-%dT%H-%M-%S")
# --------------- NEW CHANGE END ---------------
class AgentOutput(BaseModel):
agent_name: str
task: str

@ -44,16 +44,16 @@ class OpenAIFunctionCaller:
self.temperature = temperature
self.base_model = base_model
self.max_tokens = max_tokens
try:
from openai import OpenAI
except ImportError:
logger.error("OpenAI library not found. Please install the OpenAI library by running 'pip install openai'")
logger.error(
"OpenAI library not found. Please install the OpenAI library by running 'pip install openai'"
)
subprocess.run(["pip", "install", "openai"])
from openai import OpenAI
self.client = OpenAI(api_key=api_key)
def run(self, task: str, *args, **kwargs) -> BaseModel:

Loading…
Cancel
Save