Skip to content

v1.8.2: Add ThinkChunk

Choose a tag to compare

@juliendenize juliendenize released this 24 Jul 08:42
· 26 commits to main since this release
4b55642

What's Changed

Now you can use TextChunk and ThinkChunk in your SystemMessage or AssistantMessage:

from mistral_common.protocol.instruct.messages import SystemMessage, TextChunk, ThinkChunk

system_message = SystemMessage(
    content = [
        TextChunk(text="First draft your thinking process (inner monologue) until you arrive at a response. Format your response using Markdown, and use LaTeX for any mathematical equations. Write both your thoughts and the response in the same language as the input.\n\nYour thinking process must follow the template below:"),
        ThinkChunk(
            thinking="Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate the response. Use the same language as the input.",
            closed=True,
        ),
        TextChunk(text="Here, provide a self-contained response.")
    ],
)

Full Changelog: v1.8.1...v1.8.2