From 2adcefc298918101d7a50e2a785154ef69b96b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Tue, 22 Aug 2023 11:04:29 +0800 Subject: [PATCH] feat: Add tags to enable custom message classification --- metagpt/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)])