Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,7 @@ client = OpenAI(api_key=OPENAI_API_KEY)
|
|
9 |
OPEN_AI_MODEL = "gpt-4-1106-preview"
|
10 |
|
11 |
# thread = gr.State(client.beta.threads.create())
|
12 |
-
|
13 |
-
thread_id = thread.id
|
14 |
|
15 |
def wait_on_run(run, thread):
|
16 |
while run.status == "queued" or run.status == "in_progress":
|
@@ -102,7 +101,8 @@ def response_evaluation_for_case_tx(thread_id, query, question_text, input, outp
|
|
102 |
|
103 |
|
104 |
def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written):
|
105 |
-
|
|
|
106 |
if not message and not code_written:
|
107 |
ai_message = opening_statement(thread_id, question_text, input, output, examples, thread)
|
108 |
if not code_written:
|
|
|
9 |
OPEN_AI_MODEL = "gpt-4-1106-preview"
|
10 |
|
11 |
# thread = gr.State(client.beta.threads.create())
|
12 |
+
|
|
|
13 |
|
14 |
def wait_on_run(run, thread):
|
15 |
while run.status == "queued" or run.status == "in_progress":
|
|
|
101 |
|
102 |
|
103 |
def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written):
|
104 |
+
thread = client.beta.threads.create()
|
105 |
+
thread_id = thread.id
|
106 |
if not message and not code_written:
|
107 |
ai_message = opening_statement(thread_id, question_text, input, output, examples, thread)
|
108 |
if not code_written:
|