Update utils.py
Browse files
utils.py
CHANGED
@@ -475,7 +475,7 @@ def cancel_outputing():
|
|
475 |
########################################
|
476 |
#Open Assistant Funktionen für File upload
|
477 |
########################################
|
478 |
-
def submit_message(assistant_id, thread, user_message):
|
479 |
client.beta.threads.messages.create(
|
480 |
thread_id=thread.id, role="user", content=user_message
|
481 |
)
|
@@ -489,7 +489,7 @@ def get_response(thread, client, assi_id):
|
|
489 |
|
490 |
def create_thread_and_run(user_input, client, assi_id):
|
491 |
thread = client.beta.threads.create()
|
492 |
-
run = submit_message(assi_id, thread, user_input)
|
493 |
return thread, run
|
494 |
|
495 |
def pretty_print(messages):
|
|
|
475 |
########################################
|
476 |
#Open Assistant Funktionen für File upload
|
477 |
########################################
|
478 |
+
def submit_message(assistant_id, thread, client, user_message):
|
479 |
client.beta.threads.messages.create(
|
480 |
thread_id=thread.id, role="user", content=user_message
|
481 |
)
|
|
|
489 |
|
490 |
def create_thread_and_run(user_input, client, assi_id):
|
491 |
thread = client.beta.threads.create()
|
492 |
+
run = submit_message(assi_id, thread, client, user_input)
|
493 |
return thread, run
|
494 |
|
495 |
def pretty_print(messages):
|