mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
更新schema,增加消息类型
This commit is contained in:
parent
6e9fc81726
commit
074e28ff17
2 changed files with 9 additions and 1 deletions
|
|
@ -7,7 +7,6 @@
|
|||
"""
|
||||
import asyncio
|
||||
from typing import Iterable
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from metagpt.memory import Memory
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue