From 7555e5065be1475721ced6403e35d52aea519fc7 Mon Sep 17 00:00:00 2001 From: Wizerd Date: Mon, 29 Jan 2024 13:59:41 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E4=BC=98=E5=8C=96=E6=B2=99=E7=AE=B1?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD=E5=A4=B1=E8=B4=A5=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index a2184c7..af8550b 100644 --- a/main.py +++ b/main.py @@ -889,6 +889,8 @@ def replace_sandbox(text, conversation_id, message_id, api_key): def replace_match(match): sandbox_path = match.group(1) download_url = get_download_url(conversation_id, message_id, sandbox_path) + if download_url == None: + return "\n```\nError: 沙箱文件下载失败,这可能是因为您启用了隐私模式\n```" file_name = extract_filename(download_url) timestamped_file_name = timestamp_filename(file_name) if USE_OAIUSERCONTENT_URL == False: