
    :iN                     :    S \ \   S\S\S\ \\ \   \4      4S jrg)tokensbegin_think_token_idend_think_token_idreturnc                    U (       d  / $ / n/ nSnU  H  nXa:X  a  U(       a  [        S5      eXa:X  a1  U(       a  UR                  US45        / nSnUR                  U5        MP  Xb:X  a<  U(       d  [        S5      eUR                  U5        UR                  US45        / nSnM  UR                  U5        M     U(       a  UR                  XE45        U$ )ab  Split the content and think chunks from a list of tokens.

Args:
    tokens: list of tokens.
    begin_think_token_id: The token id for the begin think token.
    end_think_token_id: The token id for the end think token.

Returns:
    list of tuples, where each tuple contains a list of tokens and a boolean indicating if the chunk is a think
    chunk.
Fz$Nested think chunks are not allowed.Tz2End think token found without a begin think token.)
ValueErrorappend)r   r   r   content_chunkscurrent_contentin_think_chunktokens          [/home/james-whalen/.local/lib/python3.13/site-packages/mistral_common/experimental/think.py_split_content_and_think_chunksr      s     	35N!#ON(^CDD*%%&>?"$!N""5)(! !UVV""5)!!?D"9: O"N""5)# & ?@    N)listinttupleboolr    r   r   <module>r      s@   +I+-0+FI+	%S	4
 !+r   