mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Do not display empty user messages in chat mode.
There doesn't seem to be much value to them - they just take up space while also making it seem like there's still some sort of pseudo-dialogue going on, instead of a monologue by the bot.
This commit is contained in:
parent
a90f507abe
commit
ca47e016b4
@ -142,22 +142,23 @@ def generate_chat_html(history, name1, name2, character):
|
|||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not (i == len(history)-1 and len(row[0]) == 0):
|
if not row[0]: # don't display empty user messages
|
||||||
output += f"""
|
continue
|
||||||
<div class="message">
|
output += f"""
|
||||||
<div class="circle-you">
|
<div class="message">
|
||||||
{img_me}
|
<div class="circle-you">
|
||||||
</div>
|
{img_me}
|
||||||
<div class="text">
|
</div>
|
||||||
<div class="username">
|
<div class="text">
|
||||||
{name1}
|
<div class="username">
|
||||||
</div>
|
{name1}
|
||||||
<div class="message-body">
|
|
||||||
{row[0]}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
"""
|
<div class="message-body">
|
||||||
|
{row[0]}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
"""
|
||||||
|
|
||||||
output += "</div>"
|
output += "</div>"
|
||||||
return output
|
return output
|
||||||
|
Loading…
Reference in New Issue
Block a user