feat: 完成三角色工作台及金租对公Skills全流程演示

This commit is contained in:
NathanAlex7
2026-09-15 10:32:24 +08:00
parent 5f0b1f9409
commit 47ec090345
58 changed files with 2534 additions and 609 deletions
+2 -2
View File
@@ -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: