feat: 完成三角色工作台及金租对公Skills全流程演示
This commit is contained in:
@@ -22,9 +22,9 @@ class StructuredToolModel(BaseChatModel):
|
||||
return self
|
||||
def _generate(self, messages, stop=None, run_manager=None, **kwargs):
|
||||
if not any(isinstance(m, ToolMessage) for m in messages):
|
||||
calls = [("read_project_snapshot", {}), ("read_checks", {}), ("read_method", {"skill_id": "risk_evidence/SKILL.md"})]
|
||||
task = json.loads(next(m.content for m in messages if m.type == "human"))
|
||||
calls = [("read_project_snapshot", {}), ("read_checks", {})] + [("read_method", {"skill_id": skill_id}) for skill_id in task.get("methods", ["risk_evidence/SKILL.md"])]
|
||||
if self.cite_document:
|
||||
task = json.loads(next(m.content for m in messages if m.type == "human"))
|
||||
calls.append(("read_document", {"document_id": task["documents"][0]["id"]}))
|
||||
message = AIMessage(content="", tool_calls=[{"name": name, "args": args, "id": str(i), "type": "tool_call"} for i, (name, args) in enumerate(calls)])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user