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