bugfix
This commit is contained in:
parent
cb5d7af4d9
commit
aa4a0b211c
@ -263,7 +263,7 @@ class IndustrialSkillEngine:
|
||||
f = env.get(d.function)
|
||||
if f is None:
|
||||
e = Exception(f'function({d.function} is not in env')
|
||||
exception(f'{e}')
|
||||
exception(f'函数调用:{e}')
|
||||
await self.write_output({
|
||||
"status": "FAILED",
|
||||
"error": f'{st=}, {e}'
|
||||
@ -275,18 +275,18 @@ class IndustrialSkillEngine:
|
||||
ret = await f(self.request, params_kw=d.params)
|
||||
else:
|
||||
ret = f(self.request, params_kw=d.params)
|
||||
debug(f'函数调用:{st=}, {ret=}')
|
||||
debug(f'函数调用:{st=}, {ret=}{format_exc()}')
|
||||
await self.write_output({
|
||||
"status": "SUCCEEDED",
|
||||
"content": ret
|
||||
})
|
||||
except Exception as e:
|
||||
exception(f'{e}\n{format_exc()}')
|
||||
exception(f'函数调用:{e}\n{format_exc()}')
|
||||
await self.write_output({
|
||||
"status": "FAILED",
|
||||
"error": f'{st=}, {e}'
|
||||
})
|
||||
debug(f'调用函数返回')
|
||||
debug(f'调用函数返回{format_exc()}')
|
||||
return
|
||||
if "REPLY: " in decision:
|
||||
sessionkey = getID()
|
||||
@ -303,6 +303,7 @@ class IndustrialSkillEngine:
|
||||
debug(f'{user_reply=}===============================')
|
||||
prompt = f"{user_prompt}\n补充输入:{user_reply}"
|
||||
await self._run(prompt, context=context, is_retry=True)
|
||||
debug(f'reply: {format_exc()}')
|
||||
return
|
||||
if "EXEC:" in decision:
|
||||
cmd = decision.split("EXEC:")[1].strip()
|
||||
@ -313,6 +314,7 @@ class IndustrialSkillEngine:
|
||||
"status": "SUCCEEDED",
|
||||
"content": output
|
||||
}
|
||||
debug(f'exe: {format_exc()}')
|
||||
await self.write_output(output)
|
||||
return
|
||||
if "ANSWER:" in decision:
|
||||
@ -323,5 +325,6 @@ class IndustrialSkillEngine:
|
||||
"content": output
|
||||
}
|
||||
await self.write_output(output)
|
||||
debug(f'answer: {format_exc()}')
|
||||
return output
|
||||
debug(f' undefined decision:{decision}')
|
||||
debug(f' undefined decision:{decision}{format_exc()}')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user