Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,6 @@ from assistants import (
|
|
28 |
def chat(message, history):
|
29 |
if not message:
|
30 |
raise gr.Error("Message is required.")
|
31 |
-
|
32 |
-
raise gr.Error("Please clone and bring your own OpenAI and Tavily credentials.")
|
33 |
|
34 |
global assistant, thread
|
35 |
|
@@ -37,8 +35,11 @@ def chat(message, history):
|
|
37 |
# see https://platform.openai.com/playground/assistants.
|
38 |
# On subsequent runs, load assistant.
|
39 |
if assistant == None:
|
40 |
-
#
|
|
|
41 |
assistant = load_assistant()
|
|
|
|
|
42 |
|
43 |
# TODO: Use Gradio session to support multiple users
|
44 |
if thread == None or len(history) == 0:
|
|
|
28 |
def chat(message, history):
|
29 |
if not message:
|
30 |
raise gr.Error("Message is required.")
|
|
|
|
|
31 |
|
32 |
global assistant, thread
|
33 |
|
|
|
35 |
# see https://platform.openai.com/playground/assistants.
|
36 |
# On subsequent runs, load assistant.
|
37 |
if assistant == None:
|
38 |
+
#try:
|
39 |
+
#assistant = create_assistant()
|
40 |
assistant = load_assistant()
|
41 |
+
#except:
|
42 |
+
# raise gr.Error("Please clone and bring your own credentials.")
|
43 |
|
44 |
# TODO: Use Gradio session to support multiple users
|
45 |
if thread == None or len(history) == 0:
|