Spaces:
Sleeping
Sleeping
chat_with_jutor
Browse files
app.py
CHANGED
@@ -1247,7 +1247,7 @@ def respond(password, user_message, data, chat_history, socratic_mode=False):
|
|
1247 |
# 返回聊天历史和空字符串清空输入框
|
1248 |
return "", chat_history
|
1249 |
|
1250 |
-
def
|
1251 |
verify_password(password)
|
1252 |
|
1253 |
# 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
|
@@ -1988,7 +1988,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
|
|
1988 |
)
|
1989 |
# JUTOR API 模式
|
1990 |
jutor_send_button.click(
|
1991 |
-
|
1992 |
inputs=[password, jutor_msg, df_string_output, jutor_chatbot, socratic_mode_btn],
|
1993 |
outputs=[jutor_msg, jutor_chatbot]
|
1994 |
)
|
|
|
1247 |
# 返回聊天历史和空字符串清空输入框
|
1248 |
return "", chat_history
|
1249 |
|
1250 |
+
def chat_with_jutor(password, user_message, data, chat_history, socratic_mode=False):
|
1251 |
verify_password(password)
|
1252 |
|
1253 |
# 如果 chat_history 超過 10 則訊息,直接 return "對話超過上限"
|
|
|
1988 |
)
|
1989 |
# JUTOR API 模式
|
1990 |
jutor_send_button.click(
|
1991 |
+
chat_with_jutor,
|
1992 |
inputs=[password, jutor_msg, df_string_output, jutor_chatbot, socratic_mode_btn],
|
1993 |
outputs=[jutor_msg, jutor_chatbot]
|
1994 |
)
|