bugfix
This commit is contained in:
parent
20e352f79a
commit
1ea77072b5
@ -14,6 +14,7 @@ from appPublic.dictObject import DictObject
|
||||
from appPublic.log import info, debug, error, exception
|
||||
from appPublic.jsonConfig import getConfig
|
||||
from appPublic.uniqueID import getID
|
||||
from appPublic.zmqapi import zmq_subcribe
|
||||
|
||||
# 配置审计日志
|
||||
|
||||
@ -250,15 +251,7 @@ class IndustrialSkillEngine:
|
||||
})
|
||||
env = self.request._run_ns
|
||||
cnt = 0
|
||||
while True:
|
||||
await asyncio.sleep(0.5)
|
||||
user_reply = await env.session_getvalue(sessionkey)
|
||||
if user_reply:
|
||||
break
|
||||
if cnt >= 60:
|
||||
debug(f'env.session_getvalue("{sessionkey}") get None')
|
||||
cnt = 0
|
||||
cnt += 1
|
||||
user_reply = await zmq_subcribe(sessionkey)
|
||||
debug(f'{user_reply=}===============================')
|
||||
prompt = f"{user_prompt}\n补充输入:{user_reply}"
|
||||
await self._run(prompt, context=context, is_retry=True)
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
questionkey = params_kw.questionkey
|
||||
answer = params_kw.answer
|
||||
|
||||
if questionkey:
|
||||
await session_setvalue(questionkey, answer)
|
||||
await zmq_publish(questionkey, answer)
|
||||
return {
|
||||
"status":"SUCCEEDED",
|
||||
"data":{
|
||||
"questionkey": questionkey,
|
||||
"value": await session_getvalue(questionkey)
|
||||
"value": answer
|
||||
}
|
||||
}
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user