mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-30 16:14:05 +00:00
test
This commit is contained in:
parent
21985dc2bb
commit
4b6aaca672
@ -1013,7 +1013,7 @@ class LoLLMsAPI(LollmsApplication):
|
|||||||
ASCIIColors.blue(f"Your personal data is stored here :",end="")
|
ASCIIColors.blue(f"Your personal data is stored here :",end="")
|
||||||
ASCIIColors.green(f"{self.lollms_paths.personal_path}")
|
ASCIIColors.green(f"{self.lollms_paths.personal_path}")
|
||||||
|
|
||||||
def audio_callback(self, text):
|
def audio_callback(self, output):
|
||||||
if self.summoned:
|
if self.summoned:
|
||||||
client_id = 0
|
client_id = 0
|
||||||
self.cancel_gen = False
|
self.cancel_gen = False
|
||||||
@ -1057,7 +1057,7 @@ class LoLLMsAPI(LollmsApplication):
|
|||||||
else:
|
else:
|
||||||
self.error("I am busy. Come back later.", client_id=client_id)
|
self.error("I am busy. Come back later.", client_id=client_id)
|
||||||
else:
|
else:
|
||||||
if text.lower()=="lollms":
|
if output["text"].lower()=="lollms":
|
||||||
self.summoned = True
|
self.summoned = True
|
||||||
def rebuild_personalities(self, reload_all=False):
|
def rebuild_personalities(self, reload_all=False):
|
||||||
if reload_all:
|
if reload_all:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 2e77d696ded386d7ead9393425a024565a7a97d7
|
Subproject commit 113e5531e53f562c9c22de64236222b9ed9d9a00
|
8
web/dist/assets/index-3789d6b8.css
vendored
8
web/dist/assets/index-3789d6b8.css
vendored
File diff suppressed because one or more lines are too long
8
web/dist/assets/index-6e0a42ab.css
vendored
Normal file
8
web/dist/assets/index-6e0a42ab.css
vendored
Normal file
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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI - Welcome</title>
|
<title>LoLLMS WebUI - Welcome</title>
|
||||||
<script type="module" crossorigin src="/assets/index-b9dab24e.js"></script>
|
<script type="module" crossorigin src="/assets/index-da6af66f.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-3789d6b8.css">
|
<link rel="stylesheet" href="/assets/index-6e0a42ab.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
63
web/src/components/AudioFrame.vue
Normal file
63
web/src/components/AudioFrame.vue
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<div class="floating-frame">
|
||||||
|
<img v-if="isAudioActive" :src="imageDataUrl" alt="Spectrogram" width="300" height="300" />
|
||||||
|
<div class="controls">
|
||||||
|
<button v-if="!isAudioActive" class="w-full bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded" @click="startAudioStream">Activate Audio</button>
|
||||||
|
<button v-if="isAudioActive" class="w-full bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded" @click="stopAudioStream">Deactivate Audio</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import socket from '@/services/websocket.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isAudioActive: false,
|
||||||
|
imageDataUrl: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
startAudioStream() {
|
||||||
|
this.isAudioActive = true;
|
||||||
|
socket.emit('start_audio_stream');
|
||||||
|
},
|
||||||
|
stopAudioStream() {
|
||||||
|
this.isAudioActive = false;
|
||||||
|
this.imageData = null;
|
||||||
|
socket.emit('stop_audio_stream');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
socket.on('update_spectrogram', (imageBase64) => {
|
||||||
|
if (this.isAudioActive) {
|
||||||
|
this.imageDataUrl = 'data:image/jpeg;base64,' + imageBase64;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.floating-frame {
|
||||||
|
margin: 15px;
|
||||||
|
float: left;
|
||||||
|
width: 800px;
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 5000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-frame img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -324,7 +324,7 @@ console.log("modelImgPlaceholder:",modelImgPlaceholder)
|
|||||||
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
const bUrl = import.meta.env.VITE_LOLLMS_API_BASEURL
|
||||||
export default {
|
export default {
|
||||||
name: 'ChatBox',
|
name: 'ChatBox',
|
||||||
emits: ["messageSentEvent", "sendCMDEvent", "stopGenerating", "loaded", "createEmptyUserMessage", "createEmptyAIMessage"],
|
emits: ["messageSentEvent", "sendCMDEvent", "stopGenerating", "loaded", "createEmptyUserMessage", "createEmptyAIMessage", "personalitySelected"],
|
||||||
props: {
|
props: {
|
||||||
onTalk: Function,
|
onTalk: Function,
|
||||||
discussionList: Array,
|
discussionList: Array,
|
||||||
@ -541,6 +541,8 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$emit('personalitySelected')
|
||||||
|
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
feather.replace()
|
feather.replace()
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="flex items-center gap-3 flex-1">
|
<div class="flex items-center gap-3 flex-1">
|
||||||
<img class="w-12 hover:scale-95 duration-150 " title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
<img class="w-12 hover:scale-95 duration-150 " title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="text-2xl ">Lord of Large Language Models</p>
|
<p class="text-2xl ">Lord of Large Language and Multimodal Systems</p>
|
||||||
<p class="text-gray-400 ">One tool to rule them all</p>
|
<p class="text-gray-400 ">One tool to rule them all</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -18,10 +18,10 @@
|
|||||||
<div class="flex gap-3 flex-1 items-center justify-end">
|
<div class="flex gap-3 flex-1 items-center justify-end">
|
||||||
|
|
||||||
<div v-if="isModelOK" title="Model is ok" class="text-green-500 cursor-pointer">
|
<div v-if="isModelOK" title="Model is ok" class="text-green-500 cursor-pointer">
|
||||||
<b>M</b>
|
<b class="text-2xl">M</b>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isModelOK" title="Model is not ok" class="text-red-500 cursor-pointer">
|
<div v-if="!isModelOK" title="Model is not ok" class="text-red-500 cursor-pointer">
|
||||||
<b>M</b>
|
<b class="text-2xl">M</b>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isGenerating" title="Text is not being generated. Ready to generate" class="text-green-500 cursor-pointer">
|
<div v-if="!isGenerating" title="Text is not being generated. Ready to generate" class="text-green-500 cursor-pointer">
|
||||||
<i data-feather="flag"></i>
|
<i data-feather="flag"></i>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<img class="w-24 animate-bounce" title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
<img class="w-24 animate-bounce" title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
||||||
<div class="flex flex-col items-start">
|
<div class="flex flex-col items-start">
|
||||||
<p class="text-2xl ">Lord of Large Language Models</p>
|
<p class="text-2xl ">Lord of Large Language and Multimodal Systems</p>
|
||||||
<p class="text-gray-400 text-base">One tool to rule them all</p>
|
<p class="text-gray-400 text-base">One tool to rule them all</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<img class="w-24 animate-bounce" title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
<img class="w-24 animate-bounce" title="LoLLMS WebUI" src="@/assets/logo.png" alt="Logo">
|
||||||
<div class="flex flex-col items-start">
|
<div class="flex flex-col items-start">
|
||||||
<p class="text-2xl ">Lord of Large Language Models {{ version_info }} </p>
|
<p class="text-2xl ">Lord of Large Language and Multimodal Systems {{ version_info }} </p>
|
||||||
<p class="text-gray-400 text-base">One tool to rule them all</p>
|
<p class="text-gray-400 text-base">One tool to rule them all</p>
|
||||||
<p class="text-gray-400 text-base">by ParisNeo</p>
|
<p class="text-gray-400 text-base">by ParisNeo</p>
|
||||||
|
|
||||||
@ -261,6 +261,7 @@
|
|||||||
:discussionList="discussionArr"
|
:discussionList="discussionArr"
|
||||||
:on-show-toast-message="showToastMessage"
|
:on-show-toast-message="showToastMessage"
|
||||||
:on-talk="talk"
|
:on-talk="talk"
|
||||||
|
@personalitySelected="recoverFiles"
|
||||||
@messageSentEvent="sendMsg"
|
@messageSentEvent="sendMsg"
|
||||||
@sendCMDEvent="sendCmd"
|
@sendCMDEvent="sendCmd"
|
||||||
@createEmptyUserMessage="createEmptyUserMessage"
|
@createEmptyUserMessage="createEmptyUserMessage"
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-col">
|
<div class="flex-col w-[800]px y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary">
|
||||||
<div v-if="!activePersonality || !activePersonality.scene_path" class="text-center">
|
<div v-if="!activePersonality || !activePersonality.scene_path" class="text-center">
|
||||||
<!-- Display text when there's no scene_path or empty avatar -->
|
<!-- Display text when there's no scene_path or empty avatar -->
|
||||||
Personality does not have a 3d avatar.
|
Personality does not have a 3d avatar.
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!activePersonality || (!activePersonality.avatar || activePersonality.avatar === '')" class="text-center">
|
<div v-if="!activePersonality || (!activePersonality.avatar || activePersonality.avatar === '')" class="text-center">
|
||||||
Personality does not have an avatar.
|
Personality does not have an avatar.
|
||||||
</div>
|
</div>
|
||||||
<FloatingFrame />
|
<FloatingFrame />
|
||||||
<AudioFrame />
|
<AudioFrame />
|
||||||
<div class="floating-frame2">
|
<div class="floating-frame2">
|
||||||
<div v-html="htmlContent"></div>
|
<div v-html="htmlContent"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ref="webglContainer">
|
<div ref="webglContainer">
|
||||||
</div>
|
</div>
|
||||||
@ -164,7 +164,7 @@
|
|||||||
.floating-frame2 {
|
.floating-frame2 {
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
float: left;
|
float: left;
|
||||||
width: 200px;
|
width: 800px;
|
||||||
height: auto;
|
height: auto;
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user