alexkueck commited on
Commit
9c5aff5
1 Parent(s): d6c6bb4

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -3
utils.py CHANGED
@@ -475,10 +475,10 @@ def cancel_outputing():
475
  ########################################
476
  #Open Assistant Funktionen für File upload
477
  ########################################
478
- def get_response(thread):
479
  return client.beta.threads.messages.list(thread_id=thread.id, order="asc")
480
 
481
- def create_thread_and_run(user_input):
482
  thread = client.beta.threads.create()
483
  run = submit_message(MATH_ASSISTANT_ID, thread, user_input)
484
  return thread, run
@@ -490,7 +490,7 @@ def pretty_print(messages):
490
  print()
491
 
492
  # Waiting in a loop
493
- def wait_on_run(run, thread):
494
  while run.status == "queued" or run.status == "in_progress":
495
  run = client.beta.threads.runs.retrieve(
496
  thread_id=thread.id,
 
475
  ########################################
476
  #Open Assistant Funktionen für File upload
477
  ########################################
478
+ def get_response(thread, client):
479
  return client.beta.threads.messages.list(thread_id=thread.id, order="asc")
480
 
481
+ def create_thread_and_run(user_input, client):
482
  thread = client.beta.threads.create()
483
  run = submit_message(MATH_ASSISTANT_ID, thread, user_input)
484
  return thread, run
 
490
  print()
491
 
492
  # Waiting in a loop
493
+ def wait_on_run(run, thread, client):
494
  while run.status == "queued" or run.status == "in_progress":
495
  run = client.beta.threads.runs.retrieve(
496
  thread_id=thread.id,