Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ class MyCallbackHandler(BaseCallbackHandler):
|
|
77 |
def on_tool_end(self, output, **kwargs):
|
78 |
"""Run when tool ends running."""
|
79 |
#print("\n\nTool End: ", output)
|
80 |
-
tool_output = f"[Tool Output] {output} \n \nI am processing the output from the tool..."
|
81 |
st.session_state.messages.append(
|
82 |
{"role": "assistant", "content": tool_output}
|
83 |
)
|
@@ -344,12 +344,13 @@ if "menu" not in st.session_state:
|
|
344 |
"Chatbot",
|
345 |
"Chat Config",
|
346 |
"Document and Retriever Config",
|
347 |
-
"Source Documents
|
348 |
]
|
349 |
|
350 |
with st.sidebar:
|
351 |
selected = option_menu("Main Menu", st.session_state["menu"],
|
352 |
icons=['house', 'gear', 'gear'], menu_icon="cast", default_index=0)
|
|
|
353 |
|
354 |
col1, col2 = st.columns(2)
|
355 |
# with col1:
|
@@ -432,7 +433,7 @@ if selected == "Chatbot":
|
|
432 |
# st.write("hi")
|
433 |
|
434 |
|
435 |
-
if selected == "Source Documents
|
436 |
st.header("Source Documents for Last Query")
|
437 |
try:
|
438 |
st.subheader(st.session_state['source_documents'][0])
|
|
|
77 |
def on_tool_end(self, output, **kwargs):
|
78 |
"""Run when tool ends running."""
|
79 |
#print("\n\nTool End: ", output)
|
80 |
+
tool_output = f":blue[[Tool Output]] {output} \n \nI am processing the output from the tool..."
|
81 |
st.session_state.messages.append(
|
82 |
{"role": "assistant", "content": tool_output}
|
83 |
)
|
|
|
344 |
"Chatbot",
|
345 |
"Chat Config",
|
346 |
"Document and Retriever Config",
|
347 |
+
"Source Documents for Last Query",
|
348 |
]
|
349 |
|
350 |
with st.sidebar:
|
351 |
selected = option_menu("Main Menu", st.session_state["menu"],
|
352 |
icons=['house', 'gear', 'gear'], menu_icon="cast", default_index=0)
|
353 |
+
st.write("DO NOT navigate between pages when agent is generate messages in the chat.")
|
354 |
|
355 |
col1, col2 = st.columns(2)
|
356 |
# with col1:
|
|
|
433 |
# st.write("hi")
|
434 |
|
435 |
|
436 |
+
if selected == "Source Documents for Last Query":
|
437 |
st.header("Source Documents for Last Query")
|
438 |
try:
|
439 |
st.subheader(st.session_state['source_documents'][0])
|