Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

feat: Add tags to enable custom message classification

莘权 马2adcefc29891
diff --git a/metagpt/schema.py b/metagpt/schema.py
index 749e0fd56..2e4a6c62f 100644
--- a/metagpt/schema.py
+++ b/metagpt/schema.py
@@ -9,7 +9,7 @@
from __future__ import annotations
from dataclasses import dataclass, field
-from typing import Type, TypedDict, Set
+from typing import Type, TypedDict, Set, Optional
from pydantic import BaseModel
@@ -30,7 +30,7 @@ class Message:
cause_by: Type["Action"] = field(default="")
sent_from: str = field(default="")
send_to: str = field(default="")
- tags: Set = field(default_factory=set())
+ tags: Optional[Set] = field(default=None)
def __str__(self):
# prefix = '-'.join([self.role, str(self.cause_by)])