Skip to content

Support for thinking model #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gnouts opened this issue Jan 24, 2025 · 3 comments
Open

Support for thinking model #30

gnouts opened this issue Jan 24, 2025 · 3 comments

Comments

@gnouts
Copy link

gnouts commented Jan 24, 2025

I've seen #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 ?

@elboletaire
Copy link

elboletaire commented Jan 28, 2025

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
Copy link

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 🫡

@mwnu
Copy link

mwnu commented Feb 1, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants