Chris4K commited on
Commit
2c1d1c1
·
verified ·
1 Parent(s): 365d369

Update app_chat.py

Browse files
Files changed (1) hide show
  1. app_chat.py +4 -3
app_chat.py CHANGED
@@ -7,7 +7,8 @@ from PIL import Image
7
  from pydub import AudioSegment
8
  import IPython
9
  import soundfile as sf
10
- from app_agent_config import tool_checkboxes, url_endpoint, log_enabled
 
11
 
12
  import pandas as pd # If you're working with DataFrames
13
  import matplotlib.figure # If you're using matplotlib figures
@@ -24,7 +25,7 @@ import pydeck as pdk
24
 
25
  # Call app_agent_config to set the global variables
26
 
27
- def app_chat(tool_checkboxes, url_endpoint, log_enabled):
28
  # Chat code (user input, agent responses, etc.)
29
  if "messages" not in st.session_state:
30
  st.session_state.messages = []
@@ -44,7 +45,7 @@ def app_chat(tool_checkboxes, url_endpoint, log_enabled):
44
  # Handle submission with the selected inference URL
45
  #app_agent_config()
46
 
47
- response = handle_submission(user_message, selected_tools, url_endpoint)
48
 
49
  with st.chat_message("assistant"):
50
  if response is None:
 
7
  from pydub import AudioSegment
8
  import IPython
9
  import soundfile as sf
10
+ from app_agent_config import AgentConfig
11
+
12
 
13
  import pandas as pd # If you're working with DataFrames
14
  import matplotlib.figure # If you're using matplotlib figures
 
25
 
26
  # Call app_agent_config to set the global variables
27
 
28
+ def app_chat(agent_config):
29
  # Chat code (user input, agent responses, etc.)
30
  if "messages" not in st.session_state:
31
  st.session_state.messages = []
 
45
  # Handle submission with the selected inference URL
46
  #app_agent_config()
47
 
48
+ response = handle_submission(user_message, agent_config.selected_tools, agent_config.url_endpoint)
49
 
50
  with st.chat_message("assistant"):
51
  if response is None: