feat: Add tags to enable custom message classification

This commit is contained in:
莘权 马 2023-08-22 10:59:26 +08:00
parent 5121472bd8
commit 148279401e
2 changed files with 8 additions and 5 deletions

View file

@ -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

View file

@ -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)])