[FEAT][update streaming delay]

pull/500/merge
Kye Gomez 7 months ago
parent f87110c401
commit 029e625786

@ -42,13 +42,12 @@ agent = Agent(
verbose=True,
streaming_on=True,
# interactive=True, # Set to False to disable interactive mode
# stopping_token="<DONE>",
# saved_state_path="accounting_agent.json",
saved_state_path="accounting_agent.json",
# tools=[calculate_profit, generate_report],
# docs_folder="docs",
# pdf_path="docs/accounting_agent.pdf",
)
agent.run(
"We're the Swarm Corporation, our total revenue is $100,000 and our total expenses are $50,000."
"We're the Swarm Corporation, our total revenue is $100,000 and our total expenses are $50,000, is our revenue good?"
)

@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "swarms"
version = "5.1.8"
version = "5.2.0"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]
@ -52,6 +52,7 @@ PyYAML = "*"
docstring_parser = "0.16"
fastapi = "*"
openai = ">=1.30.1,<2.0"
termcolor = "*"
[tool.poetry.group.lint.dependencies]

@ -1793,7 +1793,7 @@ class Agent(BaseStructure):
return response
def stream_response(self, response: str, delay: float = 0.1) -> None:
def stream_response(self, response: str, delay: float = 0.01) -> None:
"""
Streams the response token by token.

@ -1,5 +1,5 @@
import pytest
from agent_rearrange import AgentRearrange
from swarms.structs.rearrange import AgentRearrange
# Mocking the Agent class

Loading…
Cancel
Save