[FEAT][update streaming delay]

pull/502/head
Kye Gomez 7 months ago
parent f87110c401
commit 029e625786

@ -42,13 +42,12 @@ agent = Agent(
verbose=True, verbose=True,
streaming_on=True, streaming_on=True,
# interactive=True, # Set to False to disable interactive mode # 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], # tools=[calculate_profit, generate_report],
# docs_folder="docs", # docs_folder="docs",
# pdf_path="docs/accounting_agent.pdf", # pdf_path="docs/accounting_agent.pdf",
) )
agent.run( 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] [tool.poetry]
name = "swarms" name = "swarms"
version = "5.1.8" version = "5.2.0"
description = "Swarms - Pytorch" description = "Swarms - Pytorch"
license = "MIT" license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"] authors = ["Kye Gomez <kye@apac.ai>"]
@ -52,6 +52,7 @@ PyYAML = "*"
docstring_parser = "0.16" docstring_parser = "0.16"
fastapi = "*" fastapi = "*"
openai = ">=1.30.1,<2.0" openai = ">=1.30.1,<2.0"
termcolor = "*"
[tool.poetry.group.lint.dependencies] [tool.poetry.group.lint.dependencies]

@ -1793,7 +1793,7 @@ class Agent(BaseStructure):
return response 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. Streams the response token by token.

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

Loading…
Cancel
Save