You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/examples/multi_agent/interactive_groupchat_examples/stream_example.py

20 lines
498 B

from swarms import Agent
# Enable real-time streaming
agent = Agent(
agent_name="StoryAgent",
# model_name="groq/llama-3.1-8b-instant",
model_name="claude-3-5-sonnet-20240620",
# system_prompt="",
streaming_on=True, # 🔥 This enables real streaming!
max_loops=1,
print_on=True,
output_type="all",
)
# This will now stream in real-time with beautiful UI!
response = agent.run(
"Tell me a detailed story about Humanity colonizing the stars"
)
print(response)