bugfix
This commit is contained in:
parent
fb4e1eac2c
commit
86fb13e168
@ -238,7 +238,7 @@ class IndustrialSkillEngine:
|
||||
"hint": "寻找合适的skill"
|
||||
})
|
||||
skill_map = {n: v.meta.description for n, v in self.registry.items()}
|
||||
target = await self.llm(f"用户意图: {user_prompt}\n可选技能清单: {skill_map}\n请返回匹配的技能名:")
|
||||
target = await self.llm(f"用户意图: {user_prompt}\n可选技能清单: {skill_map}\n只返回匹配的技能名字符串,不要其他辅助说明:")
|
||||
if not target:
|
||||
raise Exception(f"未找到技能名")
|
||||
self.state["current_skill"] = target
|
||||
@ -249,7 +249,7 @@ class IndustrialSkillEngine:
|
||||
|
||||
skill_name = self.state["current_skill"]
|
||||
if skill_name not in self.registry:
|
||||
raise Exception(f"技能名{skill_name}未注册")
|
||||
raise Exception(f"技能名:{skill_name}:未注册, 现有{[k for k in self.registry.keys()]}")
|
||||
if context is None:
|
||||
context = self.registry[skill_name].content
|
||||
# 获取递归上下文
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user