bstraehle commited on
Commit
57db60a
1 Parent(s): a1b26e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,7 +24,7 @@ from utils import function_to_schema, show_json
24
 
25
  client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
26
 
27
- assistant_id = "asst_ypbcWnilAd60bc2DQ8haDL5P"
28
 
29
  assistant, thread = None, None
30
 
@@ -223,7 +223,8 @@ def chat(message, history):
223
  global assistant, thread
224
 
225
  if assistant == None:
226
- assistant = create_assistant(client)
 
227
 
228
  if thread == None or len(history) == 0:
229
  thread = create_thread(client)
 
24
 
25
  client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
26
 
27
+ assistant_id = "asst_CJxGHbFQZADs2uUC2bxuvb7Z"
28
 
29
  assistant, thread = None, None
30
 
 
223
  global assistant, thread
224
 
225
  if assistant == None:
226
+ #assistant = create_assistant(client) # on first run, create assistant and update assistant_id (see https://platform.openai.com/playground/assistants)
227
+ assistant = load_assistant(client) # on subsequent runs, load assistant
228
 
229
  if thread == None or len(history) == 0:
230
  thread = create_thread(client)