From 75d6ff5af6f6bfa7fd770a43dd5bd8bad634c03f Mon Sep 17 00:00:00 2001 From: Kye Date: Sun, 19 Nov 2023 20:23:11 -0800 Subject: [PATCH] double response flow fix --- playground/demos/accountant_team/account_team2.py | 8 +++++--- swarms/structs/flow.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/playground/demos/accountant_team/account_team2.py b/playground/demos/accountant_team/account_team2.py index db3e6ed6..b39e91fc 100644 --- a/playground/demos/accountant_team/account_team2.py +++ b/playground/demos/accountant_team/account_team2.py @@ -19,10 +19,12 @@ openai_api_key = os.getenv("OPENAI_API_KEY") # Base llms llm1 = OpenAIChat( openai_api_key=openai_api_key, + max_tokens=5000, ) llm2 = Anthropic( anthropic_api_key=anthropic_api_key, + max_tokens=5000, ) @@ -59,16 +61,16 @@ print(pdf_text) fraud_detection_agent_output = doc_analyzer_agent.run( f"{fraud_detection_instructions}: {pdf_text}" ) -print(fraud_detection_agent_output) +# print(fraud_detection_agent_output) # Generate an actionable summary of the document summary_agent_output = summary_generator_agent.run( f"{summary_agent_instructions}: {fraud_detection_agent_output}" ) -print(summary_agent_output) +# print(summary_agent_output) # Provide decision making support to the accountant decision_making_support_agent_output = decision_making_support_agent.run( f"{decision_making_support_agent_instructions}: {summary_agent_output}" ) -print(decision_making_support_agent_output) \ No newline at end of file +# print(decision_making_support_agent_output) \ No newline at end of file diff --git a/swarms/structs/flow.py b/swarms/structs/flow.py index 8801a989..c3f36a82 100644 --- a/swarms/structs/flow.py +++ b/swarms/structs/flow.py @@ -457,7 +457,7 @@ class Flow: else: print(f"AI: {response}") history.append(f"AI: {response}") - print(response) + # print(response) break except Exception as e: logging.error(f"Error generating response: {e}")