Skip to content

Commit

Permalink
[FEAT][update streaming delay]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye Gomez authored and Kye Gomez committed Jun 17, 2024
1 parent f87110c commit 029e625
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ def generate_report(company_name: str, profit: float):
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?"
)
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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>"]
Expand Down Expand Up @@ -52,6 +52,7 @@ PyYAML = "*"
docstring_parser = "0.16"
fastapi = "*"
openai = ">=1.30.1,<2.0"
termcolor = "*"


[tool.poetry.group.lint.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion swarms/structs/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ def output_cleaner_and_output_type(

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.
Expand Down
2 changes: 1 addition & 1 deletion tests/structs/test_agent_rearrange.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from agent_rearrange import AgentRearrange
from swarms.structs.rearrange import AgentRearrange


# Mocking the Agent class
Expand Down

0 comments on commit 029e625

Please sign in to comment.