mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-31 08:25:24 +00:00
bugfix
This commit is contained in:
parent
71150f1e34
commit
5c34595fb0
2
app.py
2
app.py
@ -221,7 +221,7 @@ class Gpt4AllWebUI(GPT4AllAPI):
|
||||
self.full_message_list.append(self.bot_says)
|
||||
bot_says = markdown.markdown(self.bot_says)
|
||||
|
||||
yield bot_says
|
||||
yield "FINAL:"+bot_says
|
||||
return bot_says
|
||||
|
||||
def bot(self):
|
||||
|
@ -71,17 +71,26 @@ function update_main(){
|
||||
}
|
||||
else{
|
||||
entry_counter ++;
|
||||
prefix = "FINAL:";
|
||||
if(text.startsWith(prefix)){
|
||||
text = text.substring(prefix.length);
|
||||
hiddenElement.innerHTML = text
|
||||
messageTextElement.innerHTML = text
|
||||
}
|
||||
else{
|
||||
// For the other enrtries, these are just the text of the chatbot
|
||||
for (const char of text) {
|
||||
txt = hiddenElement.innerHTML;
|
||||
if (char != '\f') {
|
||||
txt += char
|
||||
hiddenElement.innerHTML = txt
|
||||
messageTextElement.innerHTML = txt
|
||||
}
|
||||
txt = hiddenElement.innerHTML;
|
||||
if (char != '\f') {
|
||||
txt += char
|
||||
hiddenElement.innerHTML = txt
|
||||
messageTextElement.innerHTML = txt
|
||||
}
|
||||
|
||||
// scroll to bottom of chat window
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight;
|
||||
}
|
||||
|
||||
// scroll to bottom of chat window
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user