From aa4a0b211cfc6c92f34cf3e2d398abe8f4887268 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Mar 2026 11:00:44 +0800 Subject: [PATCH] bugfix --- skillagent/skillengine.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/skillagent/skillengine.py b/skillagent/skillengine.py index 599409d..804899f 100644 --- a/skillagent/skillengine.py +++ b/skillagent/skillengine.py @@ -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()}')