mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Added prompts list
This commit is contained in:
parent
1804a87d6d
commit
d6713db3fb
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 127
|
||||
version: 128
|
||||
binding_name: null
|
||||
model_name: null
|
||||
model_variant: null
|
||||
@ -43,6 +43,7 @@ end_ai_header_id_template: ": "
|
||||
end_ai_message_id_template: ""
|
||||
|
||||
system_message_template: "system"
|
||||
use_continue_message: true
|
||||
|
||||
seed: -1
|
||||
ctx_size: 4084
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 794e5a5b8b1881a0c54b5c8ee13f9c77bb2beb73
|
||||
Subproject commit e58077fd892b7a7b1ffd7f11ef4239c66a4a4aa7
|
@ -1237,7 +1237,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
client.processing=True
|
||||
try:
|
||||
self.generate(
|
||||
self.discussion_messages+ "CONTINUE FROM HERE And do not open a new markdown code tag" if is_continue else self.discussion_messages,
|
||||
self.discussion_messages,
|
||||
self.current_message,
|
||||
context_details=context_details,
|
||||
n_predict = min(self.config.ctx_size-len(tokens)-1,self.config.max_n_predict),
|
||||
|
@ -26,6 +26,7 @@ pydantic
|
||||
selenium
|
||||
tiktoken
|
||||
|
||||
pipmaster>=0.1.2
|
||||
pipmaster>=0.1.7
|
||||
|
||||
lollmsvectordb>=0.3.0
|
||||
lollmsvectordb>=0.3.0
|
||||
freedom-search
|
@ -1 +1 @@
|
||||
Subproject commit 2adfdac00b4a43fb64f020b4a4467127bc932f6f
|
||||
Subproject commit 438619ae3b2596bc4ea62e6ea53a61e9341ca38c
|
@ -1 +1 @@
|
||||
Subproject commit 2a1aca125fffb71c7a98a49222f89080ce6daf13
|
||||
Subproject commit 2b811c1e34aeb66c1b769eb09df9cba22e2c8051
|
8
web/dist/assets/index-16450776.css
vendored
8
web/dist/assets/index-16450776.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
web/dist/assets/index-f7f15056.css
vendored
Normal file
8
web/dist/assets/index-f7f15056.css
vendored
Normal file
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 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI</title>
|
||||
<script type="module" crossorigin src="/assets/index-7f741a45.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-16450776.css">
|
||||
<script type="module" crossorigin src="/assets/index-9fb50d9a.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-f7f15056.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -100,11 +100,10 @@ export default {
|
||||
multilineCellEndMarker: '<|',
|
||||
multilineCellPadding: ' ',
|
||||
multilineCellJoiner: '\n',
|
||||
})
|
||||
.use(mathjax({
|
||||
}).use(mathjax({
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||
blockMath: [['$$', '$$'], ['\\[', '\\]']]
|
||||
}));
|
||||
}))
|
||||
|
||||
const markdownItems = ref([]);
|
||||
const updateMarkdown = () => {
|
||||
|
@ -265,9 +265,36 @@
|
||||
@copy="copyToClipBoard" @delete="deleteMessage" @rankUp="rankUpMessage"
|
||||
@rankDown="rankDownMessage" @updateMessage="updateMessage" @resendMessage="resendMessage" @continueMessage="continueMessage"
|
||||
:avatar="getAvatar(msg.sender)" />
|
||||
|
||||
|
||||
<!-- REMOVED FOR NOW, NEED MORE TESTING -->
|
||||
<!-- @click="scrollToElementInContainer($event.target, 'messages-list')" -->
|
||||
<div v-if="discussionArr.length < 2 && personality.prompts_list.length > 0" class="w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2 h-[600px]">
|
||||
<h2 class="text-2xl font-bold mb-4">Prompt examples</h2>
|
||||
<div v-if="discussionArr.length < 2 && personality.prompts_list.length > 0"
|
||||
class="overflow-y-auto flex-grow pr-2 custom-scrollbar">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-2">
|
||||
<div
|
||||
v-for="(prompt, index) in personality.prompts_list"
|
||||
:key="index"
|
||||
@click="selectPrompt(prompt)"
|
||||
class="bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-4 cursor-pointer hover:shadow-lg transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between h-[220px] overflow-hidden group"
|
||||
>
|
||||
<div
|
||||
:title="prompt"
|
||||
class="text-base text-gray-700 dark:text-gray-300 overflow-hidden relative h-full"
|
||||
>
|
||||
<div class="absolute inset-0 overflow-hidden">
|
||||
{{ prompt }}
|
||||
</div>
|
||||
<div class="absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-white dark:to-gray-800 group-hover:opacity-0 transition-opacity duration-300"></div>
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||
Click to select
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</TransitionGroup>
|
||||
@ -324,7 +351,24 @@
|
||||
|
||||
|
||||
<style scoped>
|
||||
.custom-scrollbar {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
|
||||
}
|
||||
|
||||
.custom-scrollbar::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.custom-scrollbar::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(155, 155, 155, 0.5);
|
||||
border-radius: 20px;
|
||||
border: transparent;
|
||||
}
|
||||
@keyframes custom-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
|
||||
50% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
|
||||
@ -569,6 +613,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectPrompt(prompt){
|
||||
this.$refs.chatBox.message = prompt;
|
||||
},
|
||||
extractHtml() {
|
||||
if (this.discussionArr.length > 0) {
|
||||
const lastMessage = this.discussionArr[this.discussionArr.length - 1].content;
|
||||
@ -2452,6 +2499,18 @@ export default {
|
||||
this.$store.state.isGenerating=val
|
||||
}
|
||||
},
|
||||
personality(){
|
||||
console.log("personality:", this.$store.state.config.personalities[this.$store.state.config.active_personality_id])
|
||||
const current_personality_name = this.$store.state.config.personalities[this.$store.state.config.active_personality_id]
|
||||
console.log("peronslities", this.$store.state.personalities[0])
|
||||
const personality = this.$store.state.personalities.find(personality => personality.full_path === current_personality_name);
|
||||
console.log("personality:", personality)
|
||||
return personality
|
||||
},
|
||||
prompts_list() {
|
||||
console.log(this.personality.prompts_list)
|
||||
return this.personality.prompts_list;
|
||||
},
|
||||
formatted_database_name() {
|
||||
const db_name = this.$store.state.config.discussion_db_name;
|
||||
const trimmed_name = db_name;
|
||||
|
@ -637,6 +637,22 @@
|
||||
<div v-html="full_template"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="use_continue_message" class="text-sm font-bold" style="margin-right: 1rem;" title="useful for chat models and repote models but can be less useful for instruct ones">Use continue message:</label>
|
||||
</td>
|
||||
<td style="width: 100%;">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="use_continue_message"
|
||||
required
|
||||
v-model="configFile.use_continue_message"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</Card>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 83650bc6407256694b4596c726a046d653e58d1a
|
||||
Subproject commit 13952f06d6b0492d31f130e9bfbcd35d9b42dbdd
|
@ -1 +1 @@
|
||||
Subproject commit 7866e815341967281edad9727072142a95a8a140
|
||||
Subproject commit 7f79699b081c938aa13d797669afc7a6aa31016e
|
@ -1 +1 @@
|
||||
Subproject commit 0d6f3aa416004e13d832411b4e3c291848b694e3
|
||||
Subproject commit 98668d0f79faac844f33aa00c480958d850f7139
|
Loading…
Reference in New Issue
Block a user