This commit is contained in:
Saifeddine ALOUI 2024-02-24 02:49:04 +01:00
parent 22cabe14d7
commit 58be6a7ccb
9 changed files with 58 additions and 51 deletions

View File

@ -1,7 +1,9 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 71
version: 72
binding_name: null
model_name: null
model_variant: null
model_type: null
show_news_panel: True

@ -1 +1 @@
Subproject commit 6db95c8c2df96abca9c53c1a2c40ba66bf473aef
Subproject commit 0025a367756843ce0297e68ad7dd61dd66307d07

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-0ca9e944.js"></script>
<link rel="stylesheet" href="/assets/index-05e74531.css">
<script type="module" crossorigin src="/assets/index-8305b9d3.js"></script>
<link rel="stylesheet" href="/assets/index-9198ccfe.css">
</head>
<body>
<div id="app"></div>

View File

@ -3,7 +3,7 @@
class="relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none"
:class="computed_classes"
:title="model.name"
@click.prevent="toggleSelected()">
@click.prevent="toggleSelected($event)">
<!-- CUSTOM MODEL VIEW -->
<div class="flex flex-row" v-if="model.isCustomModel">
<div class="max-w-[300px] overflow-x-auto">
@ -316,8 +316,12 @@ export default {
this.onInstall(this);
}
},
toggleSelected(force=false) {
this.onSelected(this,force)
toggleSelected(event) {
if (event.target.classList.contains('child-element')) {
event.stopPropagation();
return;
}
this.onSelected(this)
this.model.selected = true;
nextTick(() => {
feather.replace()

View File

@ -357,7 +357,9 @@ export const store = createStore({
}
commit('setModelsArr',modelsArr)
console.log("setModelsArr",modelsArr)
console.log("this.state.modelsZoo",this.state.modelsZoo)
this.state.modelsZoo.map((item)=>{
console.log("model found")
item.isInstalled=modelsArr.includes(item.name)
})
this.state.installedModels = this.state.modelsZoo.filter(item=> item.isInstalled)

View File

@ -3300,7 +3300,7 @@ export default {
},
onModelSelected(model_object, force=false) {
onModelSelected(model_object) {
// eslint-disable-next-line no-unused-vars
if (this.isLoading) {
this.$store.state.toast.showToast("Loading... please wait", 4, false)
@ -3308,30 +3308,29 @@ export default {
}
if (model_object) {
if (model_object.isInstalled) {
if (this.configFile.model_name != model_object.model.name || force) {
this.update_model(model_object.model.name).then((res)=>{
console.log("update_model",res)
this.configFile.model_name = model_object.model.name
if(res.status){
this.$store.state.toast.showToast("Selected model:\n" + model_object.name, 4, true)
nextTick(() => {
feather.replace()
this.is_loading_zoo = false
})
self.updateModelsZoo()
this.api_get_req("get_model_status").then((res)=>{
this.$store.commit('setIsModelOk', res);
})
}else{
this.$store.state.toast.showToast("Couldn't select model:\n" + model_object.name, 4, false)
nextTick(() => {
feather.replace()
})
}
this.settingsChanged = true
this.isModelSelected = true
});
}
this.update_model(model_object.model.name).then((res)=>{
console.log("update_model",res)
this.configFile.model_name = model_object.model.name
if(res.status){
this.$store.state.toast.showToast("Selected model:\n" + model_object.name, 4, true)
nextTick(() => {
feather.replace()
this.is_loading_zoo = false
})
this.updateModelsZoo()
this.api_get_req("get_model_status").then((res)=>{
this.$store.commit('setIsModelOk', res);
})
}else{
this.$store.state.toast.showToast("Couldn't select model:\n" + model_object.name, 4, false)
nextTick(() => {
feather.replace()
})
}
this.settingsChanged = true
this.isModelSelected = true
});
} else {
this.$store.state.toast.showToast("Model:\n" + model_object.model.name + "\nis not installed", 4, false)

@ -1 +1 @@
Subproject commit 1fb0fa13bb346899d8cfedf3f81b594233a6490c
Subproject commit af88028e352bd599b2a9fe49b31c8434a4307cbf