diff --git a/metagpt/environment.py b/metagpt/environment.py index 24e6ada2f..8d533d6ca 100644 --- a/metagpt/environment.py +++ b/metagpt/environment.py @@ -7,7 +7,6 @@ """ import asyncio from typing import Iterable - from pydantic import BaseModel, Field from metagpt.memory import Memory diff --git a/metagpt/schema.py b/metagpt/schema.py index 27f5dd10c..9e016059d 100644 --- a/metagpt/schema.py +++ b/metagpt/schema.py @@ -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 = [