Refactor agent initialization parameters for improved clarity and functionality

pull/933/head
harshalmore31 2 months ago
parent a25741ffd4
commit d0efa7ab96

@ -3,15 +3,11 @@ from swarms import Agent
# Enable real-time streaming # Enable real-time streaming
agent = Agent( agent = Agent(
agent_name="StoryAgent", agent_name="StoryAgent",
model_name="gpt-4o-mini", # 🔥 This enables real streaming! model_name="gpt-4o-mini",
max_loops=4, streaming_on=True, # 🔥 This enables real streaming!
streaming_on=True, max_loops=1,
print_on=True, print_on=True, # By Default its False, raw streaming !!
output_type="all",
) )
# This will now stream in real-time with beautiful UI! # This will now stream in real-time with beautiful UI!
response = agent.run( response = agent.run("Tell me a detailed story...")
"Tell me a detailed story about Humanity colonizing the stars"
)
# print(response)
Loading…
Cancel
Save