更新schema,增加消息类型

This commit is contained in:
stellahsr 2023-09-24 11:22:38 +08:00
parent 6e9fc81726
commit 074e28ff17
2 changed files with 9 additions and 1 deletions

View file

@ -7,7 +7,6 @@
"""
import asyncio
from typing import Iterable
from pydantic import BaseModel, Field
from metagpt.memory import Memory

View file

@ -70,7 +70,16 @@ class AIMessage(Message):
def __init__(self, content: str):
super().__init__(content, 'assistant')
class HumanMessage(Message):
"""
便于支持OpenAI的消息
Facilitate support for OpenAI messages
"""
def __init__(self, content: str):
super().__init__(content, 'human')
if __name__ == '__main__':
test_content = 'test_message'
msgs = [