double response flow fix

pull/162/head
Kye 1 year ago
parent be62f09bb5
commit 0929e9c68d

@ -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)
# print(decision_making_support_agent_output)

@ -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}")

Loading…
Cancel
Save