Spaces:
Sleeping
Sleeping
if not ai_name in ["jutor", "claude3", "groq"]:
Browse files
app.py
CHANGED
@@ -1681,12 +1681,18 @@ def chat_with_ai(ai_name, password, video_id, trascript_state, key_moments, user
|
|
1681 |
error_msg = "此次對話超過上限(對話一輪10次)"
|
1682 |
raise gr.Error(error_msg)
|
1683 |
|
|
|
|
|
|
|
1684 |
if ai_name == "jutor":
|
1685 |
ai_client = ""
|
1686 |
elif ai_name == "claude3":
|
1687 |
ai_client = BEDROCK_CLIENT
|
1688 |
elif ai_name == "groq":
|
1689 |
ai_client = GROQ_CLIENT
|
|
|
|
|
|
|
1690 |
if isinstance(trascript_state, str):
|
1691 |
simple_transcript = json.loads(trascript_state)
|
1692 |
else:
|
|
|
1681 |
error_msg = "此次對話超過上限(對話一輪10次)"
|
1682 |
raise gr.Error(error_msg)
|
1683 |
|
1684 |
+
if not ai_name in ["jutor", "claude3", "groq"]:
|
1685 |
+
ai_name = "jutor"
|
1686 |
+
|
1687 |
if ai_name == "jutor":
|
1688 |
ai_client = ""
|
1689 |
elif ai_name == "claude3":
|
1690 |
ai_client = BEDROCK_CLIENT
|
1691 |
elif ai_name == "groq":
|
1692 |
ai_client = GROQ_CLIENT
|
1693 |
+
else:
|
1694 |
+
ai_client = ""
|
1695 |
+
|
1696 |
if isinstance(trascript_state, str):
|
1697 |
simple_transcript = json.loads(trascript_state)
|
1698 |
else:
|