bugfix
This commit is contained in:
parent
bec9ec3a14
commit
56602d54a0
@ -65,11 +65,11 @@ async def run_subprocess(command, cwd, env, timeout=30.0):
|
||||
raise Exception(f"{command} 执行超时")
|
||||
|
||||
# 对应 text=True,手动解码
|
||||
return {
|
||||
return DictObject(**{
|
||||
"stdout": stdout.decode().strip(),
|
||||
"stderr": stderr.decode().strip(),
|
||||
"return_code": process.returncode
|
||||
}
|
||||
})
|
||||
|
||||
except Exception as e:
|
||||
print(f"{command} 执行异常: {e}")
|
||||
@ -239,7 +239,11 @@ class IndustrialSkillEngine:
|
||||
|
||||
# 决策:是直接回答还是执行脚本
|
||||
decision = await self.llm(f"上下文: {context}\n问题: {user_prompt}\n决定动作:EXEC: <command> 或 ANSWER: <text> 或 REPLY: <question>")
|
||||
|
||||
output = {
|
||||
"status": "PROCESSING",
|
||||
"hint": f"决策完成:{decision=}"
|
||||
}
|
||||
await self.write_output(output)
|
||||
if "REPLY" in decision:
|
||||
sessionkey = getID()
|
||||
await self.write_output({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user