mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-03-01 11:41:37 +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)
|
self.full_message_list.append(self.bot_says)
|
||||||
bot_says = markdown.markdown(self.bot_says)
|
bot_says = markdown.markdown(self.bot_says)
|
||||||
|
|
||||||
yield bot_says
|
yield "FINAL:"+bot_says
|
||||||
return bot_says
|
return bot_says
|
||||||
|
|
||||||
def bot(self):
|
def bot(self):
|
||||||
|
@ -71,6 +71,13 @@ function update_main(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
entry_counter ++;
|
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 the other enrtries, these are just the text of the chatbot
|
||||||
for (const char of text) {
|
for (const char of text) {
|
||||||
txt = hiddenElement.innerHTML;
|
txt = hiddenElement.innerHTML;
|
||||||
@ -83,6 +90,8 @@ function update_main(){
|
|||||||
// scroll to bottom of chat window
|
// scroll to bottom of chat window
|
||||||
chatWindow.scrollTop = chatWindow.scrollHeight;
|
chatWindow.scrollTop = chatWindow.scrollHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readStream();
|
readStream();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user