From 43e713645bb7fe7fd69b76e0a0047ceee237a4a2 Mon Sep 17 00:00:00 2001 From: Guillaume Calmettes Date: Mon, 23 Sep 2024 13:34:11 +0200 Subject: [PATCH] feat: add TextChunk as possible content type for Assistant message --- src/mistral_common/protocol/instruct/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mistral_common/protocol/instruct/messages.py b/src/mistral_common/protocol/instruct/messages.py index 82d6f62..b5d80a2 100644 --- a/src/mistral_common/protocol/instruct/messages.py +++ b/src/mistral_common/protocol/instruct/messages.py @@ -77,7 +77,7 @@ class SystemMessage(BaseMessage): class AssistantMessage(BaseMessage): role: Literal[Roles.assistant] = Roles.assistant - content: Optional[str] = None + content: Optional[Union[str, List[TextChunk]]] = None tool_calls: Optional[List[ToolCall]] = None prefix: bool = False