为 echo 消息设置 speaking 状态以支持 is_speaking 实时反馈

main
fanpt 1 month ago
parent 4193b2e94c
commit b220fff187

@ -141,7 +141,9 @@ async def human(request):
nerfreals[sessionid].flush_talk() nerfreals[sessionid].flush_talk()
if params['type']=='echo': if params['type']=='echo':
nerfreals[sessionid].speaking = True
nerfreals[sessionid].put_msg_txt(params['text']) nerfreals[sessionid].put_msg_txt(params['text'])
elif params['type']=='chat': elif params['type']=='chat':
asyncio.get_event_loop().run_in_executor(None, llm_response, params['text'],nerfreals[sessionid]) asyncio.get_event_loop().run_in_executor(None, llm_response, params['text'],nerfreals[sessionid])
#nerfreals[sessionid].put_msg_txt(res) #nerfreals[sessionid].put_msg_txt(res)

Loading…
Cancel
Save