mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-24 06:36:37 +00:00
working file sending
This commit is contained in:
parent
00bc1e3520
commit
9d8fd516e2
9
app.py
9
app.py
@ -571,6 +571,9 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
personality_info['installed'] = (self.lollms_paths.personal_configuration_path/f"personality_{personality_folder.stem}.yaml").exists() or personality_info['has_scripts']
|
personality_info['installed'] = (self.lollms_paths.personal_configuration_path/f"personality_{personality_folder.stem}.yaml").exists() or personality_info['has_scripts']
|
||||||
personality_info['help'] = config_data.get('help', '')
|
personality_info['help'] = config_data.get('help', '')
|
||||||
personality_info['commands'] = config_data.get('commands', '')
|
personality_info['commands'] = config_data.get('commands', '')
|
||||||
|
|
||||||
|
languages_path = personality_folder/ 'languages'
|
||||||
|
|
||||||
real_assets_path = personality_folder/ 'assets'
|
real_assets_path = personality_folder/ 'assets'
|
||||||
assets_path = Path("personalities") / cat / pers / 'assets'
|
assets_path = Path("personalities") / cat / pers / 'assets'
|
||||||
gif_logo_path = assets_path / 'logo.gif'
|
gif_logo_path = assets_path / 'logo.gif'
|
||||||
@ -587,6 +590,11 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
jpeg_logo_path_ = real_assets_path / 'logo.jpeg'
|
jpeg_logo_path_ = real_assets_path / 'logo.jpeg'
|
||||||
bmp_logo_path_ = real_assets_path / 'logo.bmp'
|
bmp_logo_path_ = real_assets_path / 'logo.bmp'
|
||||||
|
|
||||||
|
if languages_path.exists():
|
||||||
|
personality_info['languages']=[f.stem for f in languages_path.iterdir() if f.suffix==".yaml"]
|
||||||
|
else:
|
||||||
|
personality_info['languages']=None
|
||||||
|
|
||||||
personality_info['has_logo'] = png_logo_path.is_file() or gif_logo_path.is_file()
|
personality_info['has_logo'] = png_logo_path.is_file() or gif_logo_path.is_file()
|
||||||
|
|
||||||
if gif_logo_path_.exists():
|
if gif_logo_path_.exists():
|
||||||
@ -603,6 +611,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
personality_info['avatar'] = str(bmp_logo_path).replace("\\","/")
|
personality_info['avatar'] = str(bmp_logo_path).replace("\\","/")
|
||||||
else:
|
else:
|
||||||
personality_info['avatar'] = ""
|
personality_info['avatar'] = ""
|
||||||
|
|
||||||
personalities[category_folder.name].append(personality_info)
|
personalities[category_folder.name].append(personality_info)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(f"Couldn't load personality from {personality_folder} [{ex}]")
|
print(f"Couldn't load personality from {personality_folder} [{ex}]")
|
||||||
|
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-dcf8c5e9.js"></script>
|
<script type="module" crossorigin src="/assets/index-ba2435e6.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-c838fd47.css">
|
<link rel="stylesheet" href="/assets/index-5289c8eb.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -310,6 +310,7 @@ export default {
|
|||||||
// vue.js method. The list of files are in this.fileList
|
// vue.js method. The list of files are in this.fileList
|
||||||
// This function will call this.send_file on each file from this.fileList
|
// This function will call this.send_file on each file from this.fileList
|
||||||
send_files(){
|
send_files(){
|
||||||
|
event.preventDefault(); // Add this line to prevent form validation
|
||||||
for(let i = 0; i < this.fileList.length; i++){
|
for(let i = 0; i < this.fileList.length; i++){
|
||||||
let file = this.fileList[i];
|
let file = this.fileList[i];
|
||||||
this.send_file(file);
|
this.send_file(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user