outlined lollms

This commit is contained in:
Saifeddine ALOUI 2024-09-01 03:28:43 +02:00
parent 54cbcd68c4
commit da47cb3644
7 changed files with 177 additions and 113 deletions

View File

@ -35,7 +35,6 @@ set SPCHARMESSAGE=
cls cls
@rem better isolation for virtual environment @rem better isolation for virtual environment
SET "CONDA_SHLVL=" SET "CONDA_SHLVL="
SET PYTHONNOUSERSITE=1 SET PYTHONNOUSERSITE=1
@ -44,7 +43,6 @@ SET "PYTHONHOME="
SET "TEMP=%cd%\installer_files\temp" SET "TEMP=%cd%\installer_files\temp"
SET "TMP=%cd%\installer_files\temp" SET "TMP=%cd%\installer_files\temp"
IF EXIST "installer_files" ( IF EXIST "installer_files" (
echo Removing folder: installer_files. Please wait ... echo Removing folder: installer_files. Please wait ...
RMDIR /S /Q "installer_files" RMDIR /S /Q "installer_files"
@ -79,7 +77,6 @@ echo Activating conda environment
@rem activate miniconda @rem activate miniconda
call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end ) call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end )
echo Creating new environment echo Creating new environment
@rem create the installer env @rem create the installer env
@ -94,7 +91,6 @@ if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is
@rem activate installer env @rem activate installer env
call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end ) call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end )
echo "Cloning lollms-webui" echo "Cloning lollms-webui"
git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git
git submodule update --init --recursive git submodule update --init --recursive
@ -117,7 +113,6 @@ if exist ..\win_update.bat (
copy scripts\windows\win_update.bat ..\ copy scripts\windows\win_update.bat ..\
) )
if exist ..\win_conda_session.bat ( if exist ..\win_conda_session.bat (
echo win conda session script found echo win conda session script found
) else ( ) else (
@ -144,9 +139,11 @@ echo *******************************************************************
echo. && echo. echo. && echo.
exit /b exit /b
goto end goto end
:failed :failed
echo Install failed echo Install failed
goto endend goto endend
:end :end
echo Creating a bin dir (required for llamacpp binding) echo Creating a bin dir (required for llamacpp binding)
@ -196,6 +193,15 @@ if "%option%"=="--elf" (
) else if "%option%"=="--huggingface" ( ) else if "%option%"=="--huggingface" (
echo Installing huggingface binding echo Installing huggingface binding
call python zoos/bindings_zoo/huggingface/__init__.py call python zoos/bindings_zoo/huggingface/__init__.py
) else if "%option%"=="--remote_lollms" (
echo Installing remote_lollms binding
call python zoos/bindings_zoo/remote_lollms/__init__.py
) else if "%option%"=="--xAI" (
echo Installing xAI binding
call python zoos/bindings_zoo/xAI/__init__.py
) else if "%option%"=="--gemini" (
echo Installing gemini binding
call python zoos/bindings_zoo/gemini/__init__.py
) else ( ) else (
echo No valid option selected echo No valid option selected
) )
@ -205,3 +211,4 @@ if "%option%"=="--elf" (
@rem cd .. @rem cd ..
echo Installation complete. echo Installation complete.
:endend :endend

View File

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Lollms" #define MyAppName "Lollms"
#define MyAppVersion "9.8" #define MyAppVersion "12"
#define MyAppPublisher "ParisNeo" #define MyAppPublisher "ParisNeo"
#define MyAppURL "https://www.lollms.com/" #define MyAppURL "https://www.lollms.com/"
#define MyAppExeName "win_run.bat" #define MyAppExeName "win_run.bat"
@ -49,12 +49,10 @@ Source: "../uninstall.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] [Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico" Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Code] [Code]
var var
OptionsPage: TInputOptionWizardPage; OptionsPage: TInputOptionWizardPage;
@ -69,6 +67,9 @@ LitellmRadioButton: TRadioButton;
Exllamav2RadioButton: TRadioButton; Exllamav2RadioButton: TRadioButton;
PythonLlamaCppRadioButton: TRadioButton; PythonLlamaCppRadioButton: TRadioButton;
HuggingfaceRadioButton: TRadioButton; HuggingfaceRadioButton: TRadioButton;
RemoteLollmsRadioButton: TRadioButton;
XAIRadioButton: TRadioButton;
GeminiRadioButton: TRadioButton;
procedure InitializeWizard; procedure InitializeWizard;
begin begin
@ -105,13 +106,13 @@ OpenAIRadioButton := TRadioButton.Create(OptionsPage);
OpenAIRadioButton.Caption := 'openai'; OpenAIRadioButton.Caption := 'openai';
OpenAIRadioButton.Checked := False; OpenAIRadioButton.Checked := False;
OpenAIRadioButton.Parent := OptionsPage.Surface; OpenAIRadioButton.Parent := OptionsPage.Surface;
OpenAIRadioButton.Top := GroqRadioButton.Top + GroqRadioButton.Height + 8; OpenAIRadioButton.Top := MistralAIRadioButton.Top + MistralAIRadioButton.Height + 8;
OllamaRadioButton := TRadioButton.Create(OptionsPage); OllamaRadioButton := TRadioButton.Create(OptionsPage);
OllamaRadioButton.Caption := 'ollama'; OllamaRadioButton.Caption := 'ollama';
OllamaRadioButton.Checked := False; OllamaRadioButton.Checked := False;
OllamaRadioButton.Parent := OptionsPage.Surface; OllamaRadioButton.Parent := OptionsPage.Surface;
OllamaRadioButton.Top := MistralAIRadioButton.Top + MistralAIRadioButton.Height + 8; OllamaRadioButton.Top := OpenAIRadioButton.Top + OpenAIRadioButton.Height + 8;
VllmRadioButton := TRadioButton.Create(OptionsPage); VllmRadioButton := TRadioButton.Create(OptionsPage);
VllmRadioButton.Caption := 'vllm'; VllmRadioButton.Caption := 'vllm';
@ -142,17 +143,26 @@ HuggingfaceRadioButton.Caption := 'huggingface';
HuggingfaceRadioButton.Checked := False; HuggingfaceRadioButton.Checked := False;
HuggingfaceRadioButton.Parent := OptionsPage.Surface; HuggingfaceRadioButton.Parent := OptionsPage.Surface;
HuggingfaceRadioButton.Top := PythonLlamaCppRadioButton.Top + PythonLlamaCppRadioButton.Height + 8; HuggingfaceRadioButton.Top := PythonLlamaCppRadioButton.Top + PythonLlamaCppRadioButton.Height + 8;
RemoteLollmsRadioButton := TRadioButton.Create(OptionsPage);
RemoteLollmsRadioButton.Caption := 'remote_lollms';
RemoteLollmsRadioButton.Checked := False;
RemoteLollmsRadioButton.Parent := OptionsPage.Surface;
RemoteLollmsRadioButton.Top := HuggingfaceRadioButton.Top + HuggingfaceRadioButton.Height + 8;
XAIRadioButton := TRadioButton.Create(OptionsPage);
XAIRadioButton.Caption := 'xAI';
XAIRadioButton.Checked := False;
XAIRadioButton.Parent := OptionsPage.Surface;
XAIRadioButton.Top := RemoteLollmsRadioButton.Top + RemoteLollmsRadioButton.Height + 8;
GeminiRadioButton := TRadioButton.Create(OptionsPage);
GeminiRadioButton.Caption := 'gemini';
GeminiRadioButton.Checked := False;
GeminiRadioButton.Parent := OptionsPage.Surface;
GeminiRadioButton.Top := XAIRadioButton.Top + XAIRadioButton.Height + 8;
end; end;
[Run]
Filename: {app}\first_install.bat; Parameters: "{code:GetSelectedOption}"; Flags: postinstall
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
[Code]
function GetSelectedOption(Param: string): string; function GetSelectedOption(Param: string): string;
begin begin
if ElfRadioButton.Checked then if ElfRadioButton.Checked then
@ -177,11 +187,16 @@ begin
Result := '--python_llama_cpp' Result := '--python_llama_cpp'
else if HuggingfaceRadioButton.Checked then else if HuggingfaceRadioButton.Checked then
Result := '--huggingface' Result := '--huggingface'
else if RemoteLollmsRadioButton.Checked then
Result := '--remote_lollms'
else if XAIRadioButton.Checked then
Result := '--xAI'
else if GeminiRadioButton.Checked then
Result := '--gemini'
else else
Result := ''; Result := '';
end; end;
[Code]
procedure CurStepChanged(CurStep: TSetupStep); procedure CurStepChanged(CurStep: TSetupStep);
begin begin
if (CurStep = ssPostInstall) and (GetSelectedOption('') = '') then if (CurStep = ssPostInstall) and (GetSelectedOption('') = '') then
@ -191,11 +206,9 @@ Abort;
end; end;
end; end;
[Run]
Filename: {app}\first_install.bat; Parameters: "{code:GetSelectedOption}"; Flags: postinstall
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
[UninstallRun] [UninstallRun]
Filename: {app}\uninstall.bat; RunOnceId: MyCustomUninstallAction Filename: {app}\uninstall.bat; RunOnceId: MyCustomUninstallAction

View File

@ -126,9 +126,16 @@ echo 1) None (install the binding later)
echo 2) Local binding - ollama echo 2) Local binding - ollama
echo 3) Local binding - python_llama_cpp echo 3) Local binding - python_llama_cpp
echo 4) Local binding - bs_exllamav2 echo 4) Local binding - bs_exllamav2
echo 5) Remote binding - open_router echo 5) Remote binding - groq
echo 6) Remote binding - open_ai echo 6) Remote binding - open_router
echo 7) Remote binding - mistral_ai echo 7) Remote binding - open_ai
echo 8) Remote binding - mistral_ai
echo 9) Remote binding - gemini
echo 10) Remote binding - vllm
echo 11) Remote binding - xAI
echo 12) Remote binding - elf
echo 13) Remote binding - remote lollms
echo. echo.
set /p choice="Type the number of your choice and press Enter: " set /p choice="Type the number of your choice and press Enter: "
@ -136,9 +143,17 @@ if "%choice%"=="1" goto :none
if "%choice%"=="2" goto :ollama if "%choice%"=="2" goto :ollama
if "%choice%"=="3" goto :python_llama_cpp if "%choice%"=="3" goto :python_llama_cpp
if "%choice%"=="4" goto :bs_exllamav2 if "%choice%"=="4" goto :bs_exllamav2
if "%choice%"=="5" goto :open_router if "%choice%"=="5" goto :groq
if "%choice%"=="6" goto :open_ai if "%choice%"=="6" goto :open_router
if "%choice%"=="7" goto :mistral_ai if "%choice%"=="7" goto :open_ai
if "%choice%"=="8" goto :mistral_ai
if "%choice%"=="9" goto :gemini
if "%choice%"=="10" goto :vllm
if "%choice%"=="11" goto :xAI
if "%choice%"=="12" goto :elf
if "%choice%"=="13" goto :remote_lollms
goto :end goto :end
:none :none
@ -157,6 +172,10 @@ goto :end
call python zoos/bindings_zoo/bs_exllamav2/__init__.py call python zoos/bindings_zoo/bs_exllamav2/__init__.py
goto :end goto :end
:groq
call python zoos/bindings_zoo/groq/__init__.py
goto :end
:open_router :open_router
call python zoos/bindings_zoo/open_router/__init__.py call python zoos/bindings_zoo/open_router/__init__.py
goto :end goto :end
@ -169,6 +188,27 @@ goto :end
call python zoos/bindings_zoo/mistral_ai/__init__.py call python zoos/bindings_zoo/mistral_ai/__init__.py
goto :end goto :end
:gemini
call python zoos/bindings_zoo/gemini/__init__.py
goto :end
:vllm
call python zoos/bindings_zoo/vllm/__init__.py
goto :end
:xAI
call python zoos/bindings_zoo/xAI/__init__.py
goto :end
:elf
call python zoos/bindings_zoo/elf/__init__.py
goto :end
:remote_lollms
call python zoos/bindings_zoo/remote_lollms/__init__.py
goto :end
:PrintBigMessage :PrintBigMessage
echo. && echo. echo. && echo.

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 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script> <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<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</title> <title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-6460d57e.js"></script> <script type="module" crossorigin src="/assets/index-14de4770.js"></script>
<link rel="stylesheet" href="/assets/index-a719ae7b.css"> <link rel="stylesheet" href="/assets/index-b2ef28da.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -20,7 +20,8 @@
<div class="flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"> <div class="flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10">
<div class="mb-8 w-full"> <div class="mb-8 w-full">
<h1 class="text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2 animate-glow"> <h1 class="text-6xl md:text-7xl font-bold text-red-600 mb-2"
style="text-shadow: 2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white;">
LoLLMS LoLLMS
</h1> </h1>
<p class="text-2xl text-gray-600 dark:text-gray-300 italic"> <p class="text-2xl text-gray-600 dark:text-gray-300 italic">
@ -35,7 +36,7 @@
<div class="w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg"> <div class="w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg">
<img <img
class="w-24 h-24 animate-glow rounded-full absolute top-0 transition-all duration-300 ease-linear" class="w-24 h-24 rounded-full absolute top-0 transition-all duration-300 ease-linear"
:style="{ left: `calc(${loading_progress}% - 3rem)` }" :style="{ left: `calc(${loading_progress}% - 3rem)` }"
title="LoLLMS WebUI" title="LoLLMS WebUI"
src="@/assets/strawberry.png" src="@/assets/strawberry.png"
@ -60,6 +61,9 @@
<button v-if="isReady" @click="togglePanel" class="absolute top-2 left-2 p-3 bg-white bg-opacity-0 cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 hover:shadow-xl group"> <button v-if="isReady" @click="togglePanel" class="absolute top-2 left-2 p-3 bg-white bg-opacity-0 cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 hover:shadow-xl group">
<div v-show="leftPanelCollapsed" ><i data-feather='chevron-right'></i></div> <div v-show="leftPanelCollapsed" ><i data-feather='chevron-right'></i></div>
<div v-show="!leftPanelCollapsed" ><i data-feather='chevron-left'></i></div> <div v-show="!leftPanelCollapsed" ><i data-feather='chevron-left'></i></div>