Skip to content

Commit

Permalink
feat: Add inserted_additional_messages to chat response (#169)
Browse files Browse the repository at this point in the history
Co-authored-by: chyroc <[email protected]>
  • Loading branch information
Lexiay and chyroc authored Jan 20, 2025
1 parent 3c7b915 commit fd67c33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cozepy/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ def build_audio(file_id: Optional[str] = None, file_url: Optional[str] = None):
return MessageObjectString(type=MessageObjectStringType.AUDIO, file_id=file_id, file_url=file_url)


class InsertedMessage(CozeModel):
id: str # Inserted message id


class Message(CozeModel):
# The entity that sent this message.
role: MessageRole
Expand Down Expand Up @@ -317,6 +321,8 @@ class Chat(CozeModel):
# Detailed information about Token consumption.
usage: Optional[ChatUsage] = None

inserted_additional_messages: Optional[List[InsertedMessage]] = None


class ChatPoll(CozeModel):
chat: Chat
Expand Down

0 comments on commit fd67c33

Please sign in to comment.