oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
40.9k stars 5.34k forks source link

Backslashes are writen doubled in monospaced blocks #6395

Open TiagoTiago opened 2 months ago

TiagoTiago commented 2 months ago

Describe the bug

Without monospaced markdown there is a single backslash, but if it is written with either a single backtick, or tripple on multiline blocks, it gets doubled.

If I write:

'\'

or

'''
\
'''

(replaced the backticks in the example with aposthrophes because I couldn't figure out how to them escaped correctly here)

On the webgui it is written doubled, and it is not just visual, if you click the copy button it does get copied doubled. Like this:

\\ and

\\

But looking at the console it is not internally seen as doubled; so I don't think it's a tokenizer issue.

Is there an existing issue for this?

Reproduction

Already described in the description.

Screenshot

No response

Logs

(if any), well there is no errors, so it shouldn't be a required field, that red asterisks is annoying.

System Info

Since it's a issue with the HTML itself, I suspect the system specs isn't relevant, lemme know if it somehow makes any difference.
Zeks commented 6 days ago

I can confirm that this happens, the ai doesn't even realize its reponse come with duplicated backslashes