baibot icon indicating copy to clipboard operation
baibot copied to clipboard

Support for thinking model

Open gnouts opened this issue 11 months ago • 3 comments

I've seen https://github.com/etkecc/baibot/issues/29 but it seems it was just a user issue.

With DeepSeek-R1 model being very popular currently, it'd be nice to support thinking model.

Those models output <think> tags that encapsulate the self reflexion text. Currently, baibot show this text in its messages, which is confusing for end-users.

I'd be nice if baibot could hide the thinking text, and only output the actual answer. I believe it's up to the client to do that, like OpenWebUI did it.

Do you think baibot could be shown as "typing" until the thinking process is finished ?

gnouts avatar Jan 24 '25 09:01 gnouts

I was wondering if these <think> tags could be simply wrapped in some kind of accordion-alike layer. Current behavior (at least for me) is to hide these from the output, although these tags appear in the history as title name. The information here can be useful sometimes, so completely hiding it is not the best solution.

Image Image

Note I said "an accordion-alike layer" but it could be a simple bubble icon nearby the model name opening a modal with that section <think> contents.

There should also be a way to download the full conversation with the thinking process since, right now, downloading a conversation strips all these tags.

Edit: lmao OK seems like I didn't try enough... seems to be an issue with the first chat question, all questions after the first one already render this accordion-alike layer with the thinking process in there.

elboletaire avatar Jan 28 '25 13:01 elboletaire

I actually don't know how did I end here when I was on open-webui repository and trying to open an issue there.... Sorry for that 🫡

elboletaire avatar Jan 28 '25 17:01 elboletaire

I was wondering if these <think> tags could be simply wrapped in some kind of accordion-alike layer. Current behavior (at least for me) is to hide these from the output, although these tags appear in the history as title name. The information here can be useful sometimes, so completely hiding it is not the best solution.

Image Image

Note I said "an accordion-alike layer" but it could be a simple bubble icon nearby the model name opening a modal with that section <think> contents.

There should also be a way to download the full conversation with the thinking process since, right now, downloading a conversation strips all these tags.

Edit: lmao OK seems like I didn't try enough... seems to be an issue with the first chat question, all questions after the first one already render this accordion-alike layer with the thinking process in there.

Yes, <think> can be converted to html's <details> tag in this format: Image

matrix supports HTML-type format, which is displayed as a collapse effect on the element client:

Image

Image

mwnu avatar Feb 01 '25 06:02 mwnu