Anustup commited on
Commit
7d81e9f
1 Parent(s): 661eedc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -103,15 +103,8 @@ def response_evaluation_for_case_tx(thread_id, query, question_text, input, outp
103
 
104
 
105
  def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written):
106
- try:
107
- with open("thread_id.txt", "r") as file:
108
- thread_id = file.read().strip()
109
- except FileNotFoundError:
110
- # If file does not exist, create a new thread and save its ID
111
- thread = client.beta.threads.create()
112
- thread_id = thread.id
113
- with open("thread_id.txt", "w") as file:
114
- file.write(thread_id)
115
  print(thread_id)
116
  if not message and not code_written:
117
  ai_message = opening_statement(thread_id, question_text, input, output, examples, thread)
 
103
 
104
 
105
  def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written):
106
+ thread = client.beta.threads.create()
107
+ thread_id = thread.id
 
 
 
 
 
 
 
108
  print(thread_id)
109
  if not message and not code_written:
110
  ai_message = opening_statement(thread_id, question_text, input, output, examples, thread)