restart with clear user_session
This commit is contained in:
@@ -31,11 +31,10 @@ def on_connect_to_ase(client, entry, init_data, **kwargs):
|
||||
namespace_entry, ase_client = entry
|
||||
namespace_entry.emit('open-iframe',"", room=init_data['room'], namespace='/agent')
|
||||
namespace_entry.emit('message', "Agents服务已连接, 加载教案中", room=init_data['room'], namespace='/agent')
|
||||
|
||||
clear_user_session(init_data['asengine_url'], init_data['asengine_token'], init_data['room'])
|
||||
|
||||
restart = init_data.get("restart", False)
|
||||
if restart: # 重启时,从-1章进入 0章
|
||||
clear_user_session(init_data['asengine_url'], init_data['asengine_token'], init_data['room'])
|
||||
ase_client.chatmanager.next_chapter()
|
||||
ase_client.chatmanager.load_now_chapter(load_code=restart)
|
||||
print("load_now_chapter with restart:", restart)
|
||||
|
||||
Reference in New Issue
Block a user