bohmian commited on
Commit
0109fd0
·
verified ·
1 Parent(s): 7c4f446

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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 \n (for Last Query, Click Only After Full Execution)",
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 \n (for Last Query, Click Only After Full Execution)":
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])