mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-04-22 01:30:55 +00:00
upgraded ui
This commit is contained in:
parent
fb66c9c179
commit
8aa3c4eb40
@ -14,7 +14,7 @@ from starlette.responses import StreamingResponse
|
||||
from lollms.types import MSG_TYPE
|
||||
from lollms.main_config import BaseConfig
|
||||
from lollms.utilities import detect_antiprompt, remove_text_from_string, trace_exception, show_yes_no_dialog
|
||||
from lollms.security import sanitize_path
|
||||
from lollms.security import sanitize_path, forbid_remote_access
|
||||
from ascii_colors import ASCIIColors
|
||||
from lollms.databases.discussions_database import DiscussionsDB
|
||||
from pathlib import Path
|
||||
@ -146,6 +146,7 @@ async def open_file(file_path: FilePath):
|
||||
if not show_yes_no_dialog("Validation","Do you validate the opening of a file?"):
|
||||
return {"status":False,"error":"User refused the opeining file!"}
|
||||
|
||||
forbid_remote_access(lollmsElfServer)
|
||||
try:
|
||||
# Validate the 'path' parameter
|
||||
path = sanitize_path(file_path.path)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2209934b94bfd755ef39d67d98c6517d4f00308f
|
||||
Subproject commit 6d32a1bc421f4d9e163ab41977008b42a08a2bee
|
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-f9b7f9cd.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-7711d71f.css">
|
||||
<script type="module" crossorigin src="/assets/index-6b4f7455.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-a9383c4e.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -675,19 +675,25 @@ export default {
|
||||
console.log("Setting binding to "+selectedBinding.name);
|
||||
this.selecting_binding=true
|
||||
this.selectedModel = selectedBinding
|
||||
this.$store.state.messa
|
||||
this.$store.state.messageBox.showBlockingMessage("Loading binding")
|
||||
|
||||
axios.post("/update_setting", {
|
||||
client_id: this.$store.state.client_id,
|
||||
setting_name: "binding_name",
|
||||
setting_value: selectedBinding.name
|
||||
}).then(async (response) => {
|
||||
this.$store.state.messageBox.hideBlockingMessage()
|
||||
console.log("UPDATED");
|
||||
console.log(response);
|
||||
await this.$store.dispatch('refreshConfig');
|
||||
await this.$store.dispatch('refreshBindings');
|
||||
await this.$store.dispatch('refreshModelsZoo');
|
||||
await this.$store.dispatch('refreshModels');
|
||||
await this.$store.dispatch('refreshConfig');
|
||||
this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,true)
|
||||
this.selecting_binding=false
|
||||
}).catch(err=>{
|
||||
this.$store.state.messageBox.hideBlockingMessage()
|
||||
this.$store.state.toast.showToast(`Error ${err}`,4,true)
|
||||
this.selecting_binding=false
|
||||
});
|
||||
@ -696,11 +702,13 @@ export default {
|
||||
console.log("Setting model to "+selectedModel.name);
|
||||
this.selecting_model=true
|
||||
this.selectedModel = selectedModel
|
||||
this.$store.state.messageBox.showBlockingMessage("Loading model")
|
||||
axios.post("/update_setting", {
|
||||
client_id: this.$store.state.client_id,
|
||||
setting_name: "model_name",
|
||||
setting_value: selectedModel.name
|
||||
}).then(async (response) => {
|
||||
this.$store.state.messageBox.hideBlockingMessage()
|
||||
console.log("UPDATED");
|
||||
console.log(response);
|
||||
await this.$store.dispatch('refreshConfig');
|
||||
@ -708,6 +716,7 @@ export default {
|
||||
this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,true)
|
||||
this.selecting_model=false
|
||||
}).catch(err=>{
|
||||
this.$store.state.messageBox.hideBlockingMessage()
|
||||
this.$store.state.toast.showToast(`Error ${err}`,4,true)
|
||||
this.selecting_model=false
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 73bad1838de1bb65f491dbfc75b0f53610133999
|
||||
Subproject commit 24d4ad5b6ca956169e685adb754e6645a268cbcf
|
Loading…
x
Reference in New Issue
Block a user