fix chatmanager setting time

This commit is contained in:
CakeCN
2025-09-12 15:01:44 +08:00
parent e025ac6a9c
commit 33d321070d
3 changed files with 10 additions and 6 deletions

View File

@@ -78,8 +78,8 @@ class AgentNamespace(Namespace):
)
fmd,fmdp,fsp = load_full_markdown_file(course_id, chapter_name, lesson_name)
user_uuid2chatmanager[user_uuid] = ChatManager(user_uuid, user_uuid2ase_client[user_uuid], fmd, fmdp, fsp, max_iter=5, app=current_app, socketio=self)
chatmanager = user_uuid2chatmanager[user_uuid]
chatmanager.init(user_uuid, user_uuid2ase_client[user_uuid], fmd, fmdp, fsp, max_iter=5, app=current_app, socketio=self)
chatmanager.function_manager.add_function(judge, {'course_id': course_id, 'lesson_name': lesson_name, 'root_path': f'../../study/{user_id}/{course_id}/{chapter_name}/{lesson_name}'})
chatmanager.function_manager.add_function(next_chapter, {'user_uuid': user_uuid})