refactor: brain memory

This commit is contained in:
莘权 马 2023-09-08 13:10:01 +08:00
parent 1b71081c74
commit 2c3ab2fae4

View file

@ -14,15 +14,3 @@ class MetaGPTLLMAPI(OpenAIGPTAPI):
def __init__(self):
super().__init__()
async def get_summary(self, memory, max_words=200, keep_language: bool = False, **kwargs) -> str:
"""
Return string in the following format
[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Knock knock."},
{"role": "assistant", "content": "Who's there?"},
{"role": "user", "content": "Orange."},
]
"""
return memory.dumps_raw_messages(max_length=max_words)