mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
feat: +sequence merge
This commit is contained in:
parent
67bf89996b
commit
1b9ce4abca
2 changed files with 6 additions and 2 deletions
|
|
@ -267,7 +267,7 @@ class RebuildSequenceView(Action):
|
|||
for r in rows:
|
||||
_, name = split_namespace(r.subject)
|
||||
if name == class_name:
|
||||
participants.append(name)
|
||||
participants.append(r)
|
||||
if len(participants) == 0:
|
||||
await self.graph_db.insert(
|
||||
subject=entry.subject, predicate=GraphKeyword.HAS_PARTICIPANT, object_=concat_namespace("?", class_name)
|
||||
|
|
@ -304,6 +304,10 @@ class RebuildSequenceView(Action):
|
|||
block += await self._get_source_code(participant.subject)
|
||||
block += "\n```\n"
|
||||
prompt_blocks.append(block)
|
||||
block = "## Legacy Sequence View\n"
|
||||
rows = await self.graph_db.select(subject=entry.subject, predicate=GraphKeyword.HAS_SEQUENCE_VIEW)
|
||||
block += rows[0].object_
|
||||
prompt_blocks.append(block)
|
||||
prompt = "\n---\n".join(prompt_blocks)
|
||||
|
||||
self.llm.aask(prompt, system_msgs=["You are a tool to cooperator"])
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class DotClassAttribute(BaseModel):
|
|||
}
|
||||
result = set()
|
||||
for t in types:
|
||||
t = t.strip()
|
||||
t = re.sub(r"['\"]", "", t.strip())
|
||||
if t and t not in filters:
|
||||
result.add(t)
|
||||
return list(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue