bstraehle commited on
Commit
2e933f4
1 Parent(s): 32a4665

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -6,6 +6,8 @@ from utils import function_to_schema, show_json
6
 
7
  # Tools
8
 
 
 
9
  def transfer_to_sales_agent():
10
  """Use for anything sales or buying related."""
11
  set_current_agent(sales_agent)
@@ -208,14 +210,11 @@ issues_repairs_thread = create_thread(_client)
208
  set_current_thread(triage_thread)
209
 
210
  def chat(message, history, openai_api_key):
211
- global _client, _assistant, _thread
212
-
213
- #if _assistant == None:
214
- # _assistant = create_assistant(_client)
215
 
216
- #if _thread == None:
217
- # _thread = create_thread(_client)
218
-
219
  create_message(_client, _thread, message)
220
 
221
  # async
 
6
 
7
  # Tools
8
 
9
+ sales_agent, issues_repairs_agent, triage_agent = None, None, None
10
+
11
  def transfer_to_sales_agent():
12
  """Use for anything sales or buying related."""
13
  set_current_agent(sales_agent)
 
210
  set_current_thread(triage_thread)
211
 
212
  def chat(message, history, openai_api_key):
213
+ global _client
 
 
 
214
 
215
+ _assistant = get_current_agent
216
+ _thread = get_current_thread
217
+
218
  create_message(_client, _thread, message)
219
 
220
  # async