mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-20 09:16:15 +00:00
fixed bugs
This commit is contained in:
parent
0f9d0fb82c
commit
90afa2fe35
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Models Configuration file ===========================
|
||||
version: 46
|
||||
version: 48
|
||||
binding_name: null
|
||||
model_name: null
|
||||
|
||||
@ -79,6 +79,16 @@ petals_base_url: http://0.0.0.0:8010
|
||||
enable_lollms_service: false
|
||||
lollms_base_url: http://0.0.0.0:1234
|
||||
|
||||
# elastic search service
|
||||
elastic_search_service: false
|
||||
elastic_search_url: http://0.0.0.0:9606
|
||||
|
||||
# vll service
|
||||
vllm_service: false
|
||||
vllm_url: http://0.0.0.0:8000
|
||||
vllm_model_path: mistralai/Mistral-7B-v0.1
|
||||
|
||||
|
||||
# Audio
|
||||
media_on: false
|
||||
audio_in_language: 'en-US'
|
||||
|
42
endpoints/lollms_petals.py
Normal file
42
endpoints/lollms_petals.py
Normal file
@ -0,0 +1,42 @@
|
||||
"""
|
||||
project: lollms_webui
|
||||
file: lollms_xtts.py
|
||||
author: ParisNeo
|
||||
description:
|
||||
This module contains a set of FastAPI routes that concerns petals service
|
||||
|
||||
"""
|
||||
from fastapi import APIRouter, Request
|
||||
from lollms_webui import LOLLMSWebUI
|
||||
from pydantic import BaseModel
|
||||
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, find_first_available_file_index, add_period, PackageManager
|
||||
from pathlib import Path
|
||||
from ascii_colors import ASCIIColors
|
||||
import os
|
||||
import platform
|
||||
|
||||
# ----------------------- Defining router and main class ------------------------------
|
||||
|
||||
router = APIRouter()
|
||||
lollmsElfServer:LOLLMSWebUI = LOLLMSWebUI.get_instance()
|
||||
|
||||
|
||||
# ----------------------- voice ------------------------------
|
||||
|
||||
@router.get("/install_petals")
|
||||
def install_petals():
|
||||
try:
|
||||
lollmsElfServer.ShowBlockingMessage("Installing ollama server\nPlease stand by")
|
||||
from lollms.services.ollama.lollms_ollama import install_ollama
|
||||
if install_ollama(lollmsElfServer):
|
||||
lollmsElfServer.HideBlockingMessage()
|
||||
return {"status":True}
|
||||
else:
|
||||
return {"status":False, 'error':str(ex)}
|
||||
except Exception as ex:
|
||||
trace_exception(ex)
|
||||
lollmsElfServer.HideBlockingMessage()
|
||||
return {"status":False, 'error':str(ex)}
|
@ -32,7 +32,7 @@ def install_sd():
|
||||
try:
|
||||
lollmsElfServer.ShowBlockingMessage("Installing SD api server\nPlease stand by")
|
||||
from lollms.services.sd.lollms_sd import install_sd
|
||||
install_sd(lollmsElfServer.lollms_paths)
|
||||
install_sd(lollmsElfServer)
|
||||
ASCIIColors.success("Done")
|
||||
lollmsElfServer.HideBlockingMessage()
|
||||
return {"status":True}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a1ffac42b6ffee31bf0f48ba886138b64fa0207a
|
||||
Subproject commit 14808321a92eea2d015361be94f5f43428f86e2d
|
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-e02387fb.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-a7b58bfd.css">
|
||||
<script type="module" crossorigin src="/assets/index-f277ea7b.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-1917f9ad.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -1034,6 +1034,77 @@
|
||||
</tr>
|
||||
</table>
|
||||
</Card>
|
||||
<Card title="vLLM service" :is_subcard="true" class="pb-2 m-2">
|
||||
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="enable_vllm_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable vLLM service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="enable_vllm_service"
|
||||
required
|
||||
v-model="configFile.enable_vllm_service"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary" @click="this.$store.state.messageBox.showMessage('Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding.\nIf you are using windows, this uses wsl which requires you to have it installed or at least activated.\nIf You are using windows, this will install wsl so you need to activate it.\n<a href=\'https://techcommunity.microsoft.com/t5/windows-11/how-to-install-the-linux-windows-subsystem-in-windows-11/m-p/2701207\' target=\'_blank\'>Here is how you can do that</a>')">
|
||||
<i data-feather="help-circle" class="w-5 h-5 "></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="vllm_url" class="text-sm font-bold" style="margin-right: 1rem;">Install cLLM service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<button class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" @click="reinstallvLLMService">install vLLM service</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="vllm_url" class="text-sm font-bold" style="margin-right: 1rem;">vllm base url:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="text"
|
||||
id="vllm_url"
|
||||
required
|
||||
v-model="configFile.vllm_url"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="vllm_model_path" class="text-sm font-bold" style="margin-right: 1rem;">vllm model path:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="text"
|
||||
id="vllm_model_path"
|
||||
required
|
||||
v-model="configFile.vllm_model_path"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</Card>
|
||||
<Card title="Petals service" :is_subcard="true" class="pb-2 m-2">
|
||||
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<tr>
|
||||
@ -1088,6 +1159,56 @@
|
||||
</tr>
|
||||
</table>
|
||||
</Card>
|
||||
<Card title="Elastic search Service (under construction)" :is_subcard="true" class="pb-2 m-2">
|
||||
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="enable_voice_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable elastic search service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="elastic_search_service"
|
||||
required
|
||||
v-model="configFile.elastic_search_service"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="install_elastic_search_service" class="text-sm font-bold" style="margin-right: 1rem;">Reinstall Elastic Search service:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<button class="hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center" @click="reinstallElasticSearchService">install ElasticSearch service</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="elastic_search_url" class="text-sm font-bold" style="margin-right: 1rem;">elastic search base url:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="text"
|
||||
id="elastic_search_url"
|
||||
required
|
||||
v-model="configFile.elastic_search_url"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</Card>
|
||||
<Card title="XTTS service" :is_subcard="true" class="pb-2 m-2">
|
||||
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<tr>
|
||||
@ -2276,6 +2397,26 @@ export default {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
},
|
||||
reinstallvLLMService(){
|
||||
axios.get('install_vllm')
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
},
|
||||
reinstallPetalsService(){
|
||||
axios.get('install_vllm')
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
},
|
||||
reinstallOLLAMAService(){
|
||||
axios.get('install_ollama')
|
||||
@ -2296,6 +2437,17 @@ export default {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
reinstallElasticSearchService(){
|
||||
axios.get('install_vllm')
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
getSeviceVoices() {
|
||||
axios.get('list_voices')
|
||||
.then(response => {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fc388ab401bfeba71b03c4197879f19426be7e09
|
||||
Subproject commit ff7aed6d91d2ee5dc28e900b12e2e4b495800193
|
@ -1 +1 @@
|
||||
Subproject commit ecee44d0ad9c375e6ff616d5d1df2c3080aed701
|
||||
Subproject commit ba074f0a6269aabb9d00117cfb52600c01fb3a6a
|
Loading…
x
Reference in New Issue
Block a user