youngtsai commited on
Commit
324e5fe
1 Parent(s): 83ac31e

error_msg = "你的訊息太長了,請縮短訊息長度至五百字以內"

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -997,7 +997,7 @@ def respond(user_message, data, chat_history, socratic_mode=False):
997
  def chat_with_youtube_transcript(youtube_id, thread_id, user_message, chat_history, socratic_mode=False):
998
  # 先計算 user_message 是否超過 500 個字
999
  if len(user_message) > 1500:
1000
- error_msg = "你的訊息太長了,請縮短訊息長度"
1001
  raise gr.Error(error_msg)
1002
 
1003
  assistant_id = "asst_kmvZLNkDUYaNkMNtZEAYxyPq"
 
997
  def chat_with_youtube_transcript(youtube_id, thread_id, user_message, chat_history, socratic_mode=False):
998
  # 先計算 user_message 是否超過 500 個字
999
  if len(user_message) > 1500:
1000
+ error_msg = "你的訊息太長了,請縮短訊息長度至五百字以內"
1001
  raise gr.Error(error_msg)
1002
 
1003
  assistant_id = "asst_kmvZLNkDUYaNkMNtZEAYxyPq"