[PLAYRGROUNDFIX]

pull/537/head
Kye Gomez 6 months ago
parent fa1e92714b
commit 97a64dd0d5

@ -131,8 +131,6 @@ nav:
- Swarm Ecosystem: "swarms/ecosystem.md"
- Framework:
- Overview: "swarms/framework/index.md"
- Contributing:
- Tests: "swarms/framework/test.md"
- Models:
- Overview: "swarms/models/index.md"
- How to Create A Custom Language Model: "swarms/models/custom_model.md"
@ -148,6 +146,8 @@ nav:
- Overview: "swarms/structs/multi_agent_orchestration.md"
- Swarm Architectures: "swarms/concept/swarm_architectures.md"
- Workflows: "swarms/structs/workflows.md"
- Contributing:
- Tests: "swarms/framework/test.md"
- Reference:
- Overview: "swarms/structs/index.md"
- Models:

@ -1,17 +0,0 @@
from swarms.agents import MultiModalAgent
load_dict = {"ImageCaptioning": "cuda"}
node = MultiModalAgent(load_dict)
text = node.run_text("What is your name? Generate a picture of yourself")
img = node.run_img("/image1", "What is this image about?")
chat = node.chat(
(
"What is your name? Generate a picture of yourself. What is"
" this image about?"
),
streaming=True,
)

@ -1,32 +0,0 @@
# Importing necessary modules
import os
from dotenv import load_dotenv
from swarms import OpenAIChat
from swarms.agents.worker_agent import Worker
# Loading environment variables from .env file
load_dotenv()
# Retrieving the OpenAI API key from environment variables
api_key = os.getenv("OPENAI_API_KEY")
# Creating a Worker instance
worker = Worker(
name="My Worker",
role="Worker",
human_in_the_loop=False,
tools=[],
temperature=0.5,
llm=OpenAIChat(openai_api_key=api_key),
verbose=True,
)
# Running the worker with a prompt
out = worker.run(
"Hello, how are you? Create an image of how your are doing!"
)
# Printing the output
print(out)

@ -57,6 +57,7 @@ worker2 = Agent(
# Create a list of agents
agents = [director, worker1, worker2]
@pytest.fixture
def collaboration():
return MultiAgentCollaboration(agents)

Loading…
Cancel
Save