Adds <think> tag and thinking guide for Mistral-Thinker
""" Mistral-Thinker needs this hack to properly initiate the thinking process. - The filter adds a think-tag by default. - It attempts to prevent repeated insertion, but this works with moderate success. - Since Mistral-Thinker doesn't respect system prompts very well, the filter converts the chat's system prompt into a user input. - The filter can also be used to influence Mistral's thinking process. To do this, change the valve think_guide to a sentence that guides the beginning of the thinking process. - Example valve setting for this: 'Okay, ich antworte auf deutsch.' to make Mistral-Thinker respond in german """ from pydantic import BaseModel, Field from typing import Optional, Dict, Any, List
Adds tag and thinking guide for Mistral-Thinker
We use optional analytics to improve our websites, and advertising cookies on this site. Privacy Policy.