Skip to content

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

feat: Add tags to enable custom message classification

莘权 马148279401ee3
diff --git a/metagpt/__init__.py b/metagpt/__init__.py
index 16359ca19..2980109dd 100644
--- a/metagpt/__init__.py
+++ b/metagpt/__init__.py
@@ -1,9 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# @Time : 2023/4/24 22:26
-# @Author : alexanderwu
-# @File : __init__.py
-# @Desc : mashenquan, 2023/8/22. Add `Message` for importing by external projects.
+"""
+@Time : 2023/4/24 22:26
+@Author : alexanderwu
+@File : __init__.py
+@Desc : mashenquan, 2023/8/22. Add `Message` for importing by external projects.
+"""
from metagpt.schema import Message
diff --git a/metagpt/schema.py b/metagpt/schema.py
index 4e6cba4ca..749e0fd56 100644
--- a/metagpt/schema.py
+++ b/metagpt/schema.py
@@ -4,6 +4,7 @@
@Time : 2023/5/8 22:12
@Author : alexanderwu
@File : schema.py
+@Desc : mashenquan, 2023/8/22. Add tags to enable custom message classification.
"""
from __future__ import annotations
@@ -29,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: Set = field(default_factory=set())
def __str__(self):
# prefix = '-'.join([self.role, str(self.cause_by)])