This commit is contained in:
Saifeddine ALOUI 2023-09-13 23:17:45 +02:00
parent fd2c921ab7
commit 568e334970
5 changed files with 19 additions and 10 deletions

View File

@ -1006,7 +1006,7 @@ class LoLLMsAPPI(LollmsApplication):
full_message_list = []
for i, message in enumerate(messages):
if message.id< message_id or (message_id==-1 and i<len(messages)-1):
if message.message_type<=MSG_TYPE.MSG_TYPE_FULL_INVISIBLE_TO_USER.value and message.message_type!=MSG_TYPE.MSG_TYPE_FULL_INVISIBLE_TO_AI.value:
if message.content!='' and (message.message_type<=MSG_TYPE.MSG_TYPE_FULL_INVISIBLE_TO_USER.value and message.message_type!=MSG_TYPE.MSG_TYPE_FULL_INVISIBLE_TO_AI.value):
full_message_list.append("\n"+self.config.discussion_prompt_separator+message.sender+": "+message.content.strip())
else:
break
@ -1183,6 +1183,8 @@ class LoLLMsAPPI(LollmsApplication):
self.connections[client_id]["current_discussion"].update_message(self.connections[client_id]["generated_text"], new_metadata=mtdt, new_ui=ui)
def close_message(self, client_id):
if not self.connections[client_id]["current_discussion"]:
return
#fix halucination
self.connections[client_id]["generated_text"]=self.connections[client_id]["generated_text"].split("!@>")[0]
# Send final message

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-f94f26a9.js"></script>
<link rel="stylesheet" href="/assets/index-98bcc0af.css">
<script type="module" crossorigin src="/assets/index-cd17b563.js"></script>
<link rel="stylesheet" href="/assets/index-e09d4cea.css">
</head>
<body>
<div id="app"></div>

View File

@ -390,6 +390,13 @@ export default {
}
else{
this.onShowToastMessage("Couldn't upload file\n"+resp.error,4,false);
try{
this.fileList.removeItem(file)
}
catch{
}
}
socket.off('file_received')
})