Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,8 @@ agent_executor = AgentExecutor.from_agent_and_tools(
|
|
90 |
agent=agent,
|
91 |
tools=tools,
|
92 |
verbose=True,
|
93 |
-
memory=ConversationBufferMemory()
|
|
|
94 |
)
|
95 |
|
96 |
# Streamlit interface
|
@@ -114,7 +115,8 @@ if lead_name:
|
|
114 |
with st.spinner("AI is generating a response..."):
|
115 |
response = agent_executor.run(initial_message)
|
116 |
st.write("AI Response:")
|
117 |
-
st.write(response
|
|
|
118 |
|
119 |
st.sidebar.title("About")
|
120 |
st.sidebar.info("This is a demo of an AI CyberSecurity Program Advisor using an open-source LLM and LangChain. It's designed to engage with leads and attempt to book video calls for sales meetings.")
|
|
|
90 |
agent=agent,
|
91 |
tools=tools,
|
92 |
verbose=True,
|
93 |
+
memory=ConversationBufferMemory(),
|
94 |
+
output_keys=["final_answer"] # Explicitly define the output key(s) here
|
95 |
)
|
96 |
|
97 |
# Streamlit interface
|
|
|
115 |
with st.spinner("AI is generating a response..."):
|
116 |
response = agent_executor.run(initial_message)
|
117 |
st.write("AI Response:")
|
118 |
+
st.write(response) # Now 'response' will directly be the final answer
|
119 |
+
|
120 |
|
121 |
st.sidebar.title("About")
|
122 |
st.sidebar.info("This is a demo of an AI CyberSecurity Program Advisor using an open-source LLM and LangChain. It's designed to engage with leads and attempt to book video calls for sales meetings.")
|