mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 04:47:55 +00:00
repared encoding issue fix 2
This commit is contained in:
parent
fb239bf4e5
commit
19c584010f
4
app.py
4
app.py
@ -267,7 +267,7 @@ GPT4All:Welcome! I'm here to assist you with anything you need. What can I do fo
|
|||||||
self.bot_says += text
|
self.bot_says += text
|
||||||
if self.current_message in self.full_text:
|
if self.current_message in self.full_text:
|
||||||
self.is_bot_text_started = True
|
self.is_bot_text_started = True
|
||||||
yield text.encode('utf-8').decode('latin-1')
|
yield text# .encode('utf-8').decode('utf-8')
|
||||||
|
|
||||||
def add_endpoint(
|
def add_endpoint(
|
||||||
self,
|
self,
|
||||||
@ -339,7 +339,7 @@ GPT4All:Welcome! I'm here to assist you with anything you need. What can I do fo
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.current_discussion.update_message(response_id, self.bot_says)
|
self.current_discussion.update_message(response_id, self.bot_says)
|
||||||
yield self.bot_says.encode('utf-8').decode('latin-1')
|
yield self.bot_says# .encode('utf-8').decode('utf-8')
|
||||||
# TODO : change this to use the yield version in order to send text word by word
|
# TODO : change this to use the yield version in order to send text word by word
|
||||||
|
|
||||||
return "\n".join(bot_says)
|
return "\n".join(bot_says)
|
||||||
|
@ -117,6 +117,8 @@ function addMessage(sender, message, id, can_edit=false) {
|
|||||||
inputField.type = 'text';
|
inputField.type = 'text';
|
||||||
inputField.classList.add('font-medium', 'text-md', 'border', 'border-gray-300', 'p-1');
|
inputField.classList.add('font-medium', 'text-md', 'border', 'border-gray-300', 'p-1');
|
||||||
inputField.value = messageTextElement.innerHTML;
|
inputField.value = messageTextElement.innerHTML;
|
||||||
|
|
||||||
|
editButton.style.display="none"
|
||||||
|
|
||||||
const saveButton = document.createElement('button');
|
const saveButton = document.createElement('button');
|
||||||
saveButton.classList.add('bg-green-500', 'hover:bg-green-700', 'text-white', 'font-bold', 'py-2', 'px-4', 'rounded', 'my-2', 'ml-2');
|
saveButton.classList.add('bg-green-500', 'hover:bg-green-700', 'text-white', 'font-bold', 'py-2', 'px-4', 'rounded', 'my-2', 'ml-2');
|
||||||
@ -138,6 +140,7 @@ function addMessage(sender, message, id, can_edit=false) {
|
|||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('There was a problem updating the message:', error);
|
console.error('There was a problem updating the message:', error);
|
||||||
});
|
});
|
||||||
|
editButton.style.display="block"
|
||||||
messageElement.replaceChild(messageTextElement, inputField);
|
messageElement.replaceChild(messageTextElement, inputField);
|
||||||
//messageElement.removeChild(inputField);
|
//messageElement.removeChild(inputField);
|
||||||
messageElement.removeChild(saveButton);
|
messageElement.removeChild(saveButton);
|
||||||
|
Loading…
Reference in New Issue
Block a user