mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-04-15 14:46:34 +00:00
sync
This commit is contained in:
parent
b4c37b6983
commit
fca7c54748
@ -1 +1 @@
|
||||
Subproject commit 7551e7fa021a9526239fda2ca0814583791c35c2
|
||||
Subproject commit 0337e8a38bbbfe12d34a7eea304710b355826f3c
|
@ -750,15 +750,17 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
discussion = self.recover_discussion(client_id)
|
||||
if self.config.internet_activate_search_decision:
|
||||
self.personality.step_start(f"Requesting if {self.personality.name} needs to search internet to answer the user")
|
||||
need = not self.personality.yes_no(f"Are you able to fulfill {self.config.user_name}'s request without internet search?\nIf he is asking for information that can be found on internet please answer 0 (no).", discussion)
|
||||
need = not self.personality.yes_no(f"Do you have enough information to give a satisfactory answer to {self.config.user_name}'s request without internet search? (If you do not know or you can't answer 0 (no)", discussion)
|
||||
self.personality.step_end(f"Requesting if {self.personality.name} needs to search internet to answer the user")
|
||||
self.personality.step("Yes" if need else "No")
|
||||
else:
|
||||
need=True
|
||||
if need:
|
||||
self.personality.step_start("Crafting internet search query")
|
||||
query = self.personality.fast_gen(f"!@>discussion:\n{discussion[-2048:]}\n!@>instruction: Read the discussion and craft a web search query suited to recover needed information to reply to last {self.config.user_name} message.\nDo not answer the prompt. Do not add explanations.\n!@>websearch query: ", max_generation_size=256, show_progress=True)
|
||||
query = self.personality.fast_gen(f"!@>discussion:\n{discussion[-2048:]}\n!@>instruction: Read the discussion and craft a web search query suited to recover needed information to reply to last {self.config.user_name} message.\nDo not answer the prompt. Do not add explanations.\n!@>websearch query: ", max_generation_size=256, show_progress=True, callback=self.personality.sink)
|
||||
self.personality.step_end("Crafting internet search query")
|
||||
self.personality.step(f"query:{query}")
|
||||
|
||||
self.personality.step_start("Performing Internet search")
|
||||
|
||||
internet_search_results=f"!@>important information: Use the internet search results data to answer {self.config.user_name}'s last message. It is strictly forbidden to give the user an answer without having actual proof from the documentation.\n!@>Web search results:\n"
|
||||
|
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
4
web/dist/index.html
vendored
@ -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-1e833b9c.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-822a6900.css">
|
||||
<script type="module" crossorigin src="/assets/index-e3a9f414.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-b55bf791.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -2,26 +2,26 @@
|
||||
<div class="flex items-start">
|
||||
<div class="step flex items-center mb-4">
|
||||
<div class="flex items-center justify-center w-6 h-6 mr-2">
|
||||
<div v-if="!done">
|
||||
<div v-if="!done && type=='start_end'">
|
||||
<i
|
||||
data-feather="square"
|
||||
class="text-gray-400 w-4 h-4"
|
||||
></i>
|
||||
</div>
|
||||
<div v-if="done && status">
|
||||
<div v-if="done && status && type=='start_end'">
|
||||
<i
|
||||
data-feather="check-square"
|
||||
class="text-green-500 w-4 h-4"
|
||||
></i>
|
||||
</div>
|
||||
<div v-if="done && !status">
|
||||
<div v-if="done && !status && type=='start_end'">
|
||||
<i
|
||||
data-feather="x-square"
|
||||
class="text-red-500 w-4 h-4"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!done" role="status">
|
||||
<div v-if="!done" role="status" class="m-15">
|
||||
<svg aria-hidden="true" class="w-6 h-6 animate-spin fill-secondary" viewBox="0 0 100 101"
|
||||
fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
@ -56,7 +56,11 @@
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
|
||||
type: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'start_end'
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1258,13 +1258,11 @@ export default {
|
||||
else if(messageItem && msgObj.message_type==this.msgTypes.MSG_TYPE_CHUNK){
|
||||
messageItem.content += msgObj.content
|
||||
} else if (msgObj.message_type == this.msgTypes.MSG_TYPE_STEP){
|
||||
console.log("received step")
|
||||
messageItem.status_message = msgObj.content
|
||||
messageItem.steps.push({"message":msgObj.content,"done":true, "status":true })
|
||||
messageItem.steps.push({"message":msgObj.content,"done":true, "status":true, "type": "instantanious" })
|
||||
} else if (msgObj.message_type == this.msgTypes.MSG_TYPE_STEP_START){
|
||||
console.log("received step start")
|
||||
messageItem.status_message = msgObj.content
|
||||
messageItem.steps.push({"message":msgObj.content,"done":false, "status":true })
|
||||
messageItem.steps.push({"message":msgObj.content,"done":false, "status":true, "type": "start_end" })
|
||||
} else if (msgObj.message_type == this.msgTypes.MSG_TYPE_STEP_END) {
|
||||
console.log("received step end")
|
||||
// Find the step with the matching message and update its 'done' property to true
|
||||
|
Loading…
x
Reference in New Issue
Block a user