Skip to content

Commit

Permalink
Merge pull request #466 from zhanghb18/main
Browse files Browse the repository at this point in the history
fix: unexpected keyword arg audio
  • Loading branch information
thinkwee authored Dec 17, 2024
2 parents f934e2e + 52edb89 commit 5dfb0cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions camel/messages/chat_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ class ChatMessage(BaseMessage):
role (str): The role of the message in OpenAI chat system.
content (str): The content of the message. (default: :obj:`""`)
refusal (str): The refusal to build argument.
audio (object): The audio contains data about the audio response from the model.
"""
role_name: str
role_type: RoleType
meta_dict: Optional[Dict[str, str]]
role: str
content: str = ""
refusal: str = None
audio: object = None
if openai_new_api:
function_call: Optional[FunctionCall] = None
tool_calls: Optional[ChatCompletionMessageToolCall] = None
Expand Down Expand Up @@ -76,13 +78,15 @@ class AssistantChatMessage(ChatMessage):
(default: :obj:`"assistant"`)
content (str): The content of the message. (default: :obj:`""`)
refusal (str): The refusal to build argument.
audio (object): The audio contains data about the audio response from the model.
"""
role_name: str
role_type: RoleType = RoleType.ASSISTANT
meta_dict: Optional[Dict[str, str]] = None
role: str = "user"
content: str = ""
refusal: str = None
audio: object = None


@dataclass
Expand All @@ -98,10 +102,12 @@ class UserChatMessage(ChatMessage):
(default: :obj:`"user"`)
content (str): The content of the message. (default: :obj:`""`)
refusal (str): The refusal to build argument.
audio (object): The audio contains data about the audio response from the model.
"""
role_name: str
role_type: RoleType = RoleType.USER
meta_dict: Optional[Dict[str, str]] = None
role: str = "user"
content: str = ""
refusal: str = None
audio: object = None

0 comments on commit 5dfb0cf

Please sign in to comment.