youngtsai commited on
Commit
24c5da7
·
1 Parent(s): 5067c73

(對話一輪10次)

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1674,7 +1674,7 @@ def chat_with_ai(ai_name, password, video_id, trascript_state, key_moments, user
1674
  verify_password(password)
1675
 
1676
  if chat_history is not None and len(chat_history) > 10:
1677
- error_msg = "此次對話超過上限"
1678
  raise gr.Error(error_msg)
1679
 
1680
  if ai_name == "jutor":
@@ -1745,7 +1745,7 @@ def chat_with_opan_ai_assistant(password, youtube_id, thread_id, trascript_state
1745
 
1746
  # 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
1747
  if chat_history is not None and len(chat_history) > 10:
1748
- error_msg = "此次對話超過上限"
1749
  raise gr.Error(error_msg)
1750
 
1751
  try:
@@ -1906,7 +1906,7 @@ def streaming_chat_with_open_ai(user_message, chat_history, password, thread_id,
1906
 
1907
  # 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
1908
  if chat_history is not None and len(chat_history) > 10:
1909
- error_msg = "此次對話超過上限"
1910
  raise gr.Error(error_msg)
1911
 
1912
  try:
 
1674
  verify_password(password)
1675
 
1676
  if chat_history is not None and len(chat_history) > 10:
1677
+ error_msg = "此次對話超過上限(對話一輪10次)"
1678
  raise gr.Error(error_msg)
1679
 
1680
  if ai_name == "jutor":
 
1745
 
1746
  # 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
1747
  if chat_history is not None and len(chat_history) > 10:
1748
+ error_msg = "此次對話超過上限(對話一輪10次)"
1749
  raise gr.Error(error_msg)
1750
 
1751
  try:
 
1906
 
1907
  # 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
1908
  if chat_history is not None and len(chat_history) > 10:
1909
+ error_msg = "此次對話超過上限(對話一輪10次)"
1910
  raise gr.Error(error_msg)
1911
 
1912
  try: