feat: +user requirement to Architect, ProjectManager

This commit is contained in:
莘权 马 2024-04-29 15:07:21 +08:00
parent df36fcc929
commit 125d043464
15 changed files with 264 additions and 911 deletions

View file

@ -351,8 +351,9 @@ class UserMessage(Message):
Facilitate support for OpenAI messages
"""
def __init__(self, content: str):
super().__init__(content=content, role="user")
def __init__(self, content: str, **kwargs):
kwargs.pop("role", None)
super().__init__(content=content, role="user", **kwargs)
class SystemMessage(Message):
@ -360,8 +361,9 @@ class SystemMessage(Message):
Facilitate support for OpenAI messages
"""
def __init__(self, content: str):
super().__init__(content=content, role="system")
def __init__(self, content: str, **kwargs):
kwargs.pop("role", None)
super().__init__(content=content, role="system", **kwargs)
class AIMessage(Message):
@ -369,8 +371,9 @@ class AIMessage(Message):
Facilitate support for OpenAI messages
"""
def __init__(self, content: str):
super().__init__(content=content, role="assistant")
def __init__(self, content: str, **kwargs):
kwargs.pop("role", None)
super().__init__(content=content, role="assistant", **kwargs)
class Task(BaseModel):