fix function double promlem

This commit is contained in:
Cai
2025-10-28 11:27:46 +08:00
parent f5d5077278
commit ecf19f49ee
2 changed files with 290 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
# myapp/sockets/namespaces.py
import json
import time
from flask import current_app, request, session
from flask_socketio import Namespace, join_room, leave_room, emit
@@ -219,6 +220,8 @@ class AgentNamespace(Namespace):
else: chatmanager.scores.append(data.get('data', None))
user.set_course_progress(chatmanager.chat_historys, chatmanager.scores, chatmanager.material_id, chatmanager.chapter_name, chatmanager.lesson_name)
chatmanager.load_next_chapter()
time.sleep(0.5)
chatmanager.ase_client.send_text("chapter-start", "")
def on_initiative(self,data): # 主动call