Spaces:
Sleeping
Sleeping
import time
Browse files
app.py
CHANGED
@@ -23,6 +23,7 @@ from googleapiclient.http import MediaIoBaseDownload
|
|
23 |
from googleapiclient.http import MediaIoBaseUpload
|
24 |
|
25 |
import io
|
|
|
26 |
|
27 |
|
28 |
from urllib.parse import urlparse, parse_qs
|
@@ -1029,7 +1030,7 @@ def chat_with_youtube_transcript(youtube_id, thread_id, user_message, chat_histo
|
|
1029 |
)
|
1030 |
|
1031 |
# 运行助手,生成响应
|
1032 |
-
run = client.beta.threads.runs.
|
1033 |
thread_id=thread.id,
|
1034 |
assistant_id=assistant_id
|
1035 |
)
|
@@ -1039,7 +1040,7 @@ def chat_with_youtube_transcript(youtube_id, thread_id, user_message, chat_histo
|
|
1039 |
time.sleep(3)
|
1040 |
run = client.beta.threads.runs.retrieve(
|
1041 |
thread_id=thread.id,
|
1042 |
-
|
1043 |
)
|
1044 |
|
1045 |
# 获取助手的响应消息
|
|
|
23 |
from googleapiclient.http import MediaIoBaseUpload
|
24 |
|
25 |
import io
|
26 |
+
import time
|
27 |
|
28 |
|
29 |
from urllib.parse import urlparse, parse_qs
|
|
|
1030 |
)
|
1031 |
|
1032 |
# 运行助手,生成响应
|
1033 |
+
run = client.beta.threads.runs.create(
|
1034 |
thread_id=thread.id,
|
1035 |
assistant_id=assistant_id
|
1036 |
)
|
|
|
1040 |
time.sleep(3)
|
1041 |
run = client.beta.threads.runs.retrieve(
|
1042 |
thread_id=thread.id,
|
1043 |
+
run_id=run.id
|
1044 |
)
|
1045 |
|
1046 |
# 获取助手的响应消息
|