This commit is contained in:
Saifeddine ALOUI 2024-01-14 00:37:43 +01:00
parent fa7fcf9e7a
commit 089ea35750
9 changed files with 241 additions and 190 deletions

13
app.py
View File

@ -21,7 +21,7 @@ import uvicorn
import argparse
from socketio import ASGIApp
import webbrowser
import threading
app = FastAPI()
# Create a Socket.IO server
@ -156,7 +156,16 @@ if __name__ == "__main__":
try:
sio.reboot = False
#uvicorn.run(app, host=config.host, port=6523)
if config.enable_lollms_service:
#uvicorn.run(app, host=config.host, port=6523)
def run_lollms_server():
parts = config.lollms_base_url.split(":")
uvicorn.run(app, host=":".join(parts[0:2]), port=int(parts[2]))
# New thread
thread = threading.Thread(target=run_lollms_server)
# start thread
thread.start()
uvicorn.run(app, host=config.host, port=config.port)
if sio.reboot:
ASCIIColors.info("")

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Models Configuration file ===========================
version: 44
version: 45
binding_name: null
model_name: null
@ -68,6 +68,10 @@ ollama_base_url: http://0.0.0.0:11434
enable_petals_service: false
petals_base_url: http://0.0.0.0:8010
# lollms service
enable_lollms_service: false
lollms_base_url: http://0.0.0.0:1234
# Audio
media_on: false
audio_in_language: 'en-US'

@ -1 +1 @@
Subproject commit 22e1ef85ced1e5e16f834da30a9ebb8038652325
Subproject commit 01302d7d007ba3b67e145a469f40fb389e4ee48a

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-f5e68ab6.js"></script>
<link rel="stylesheet" href="/assets/index-da6f5c1e.css">
<script type="module" crossorigin src="/assets/index-617b8904.js"></script>
<link rel="stylesheet" href="/assets/index-99284e99.css">
</head>
<body>
<div id="app"></div>

View File

@ -1068,6 +1068,44 @@
</tr>
</table>
</Card>
<Card title="Lollms 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_lollms_service" class="text-sm font-bold" style="margin-right: 1rem;">Enable lollms service:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="enable_lollms_service"
required
v-model="configFile.enable_lollms_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="lollms_base_url" class="text-sm font-bold" style="margin-right: 1rem;">lollms base url:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="text"
id="lollms_base_url"
required
v-model="configFile.lollms_base_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>

@ -1 +1 @@
Subproject commit 3b48b2cdf95665a1472e3274b538b39f97bd93eb
Subproject commit 69ded85388a7819d438d1a979686d3c1d25ef67b

@ -1 +1 @@
Subproject commit 6556d91d535f170b82829b973b63c474f08b5280
Subproject commit bba0e70e92777216319029de78be4a161735493c