Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,9 @@ def create_assistant(client):
|
|
53 |
return assistant
|
54 |
|
55 |
def load_assistant(client):
|
56 |
-
|
|
|
|
|
57 |
|
58 |
show_json("assistant", assistant)
|
59 |
|
@@ -152,7 +154,7 @@ def chat(message, history):
|
|
152 |
global client, assistant, thread
|
153 |
|
154 |
if assistant == None:
|
155 |
-
assistant =
|
156 |
|
157 |
if thread == None or len(history) == 0:
|
158 |
thread = create_thread(client)
|
|
|
53 |
return assistant
|
54 |
|
55 |
def load_assistant(client):
|
56 |
+
ASSISTANT_ID = "asst_VL5JZQzUSlIhAF8k8CfCcR0f"
|
57 |
+
|
58 |
+
assistant = client.beta.assistants.retrieve(ASSISTANT_ID)
|
59 |
|
60 |
show_json("assistant", assistant)
|
61 |
|
|
|
154 |
global client, assistant, thread
|
155 |
|
156 |
if assistant == None:
|
157 |
+
assistant = load_assistant(client)
|
158 |
|
159 |
if thread == None or len(history) == 0:
|
160 |
thread = create_thread(client)
|