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

View File

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Lollms"
#define MyAppVersion "9.8"
#define MyAppVersion "12"
#define MyAppPublisher "ParisNeo"
#define MyAppURL "https://www.lollms.com/"
#define MyAppExeName "win_run.bat"
@ -49,110 +49,120 @@ Source: "../uninstall.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Code]
var
OptionsPage: TInputOptionWizardPage;
ElfRadioButton: TRadioButton;
OpenRouterRadioButton: TRadioButton;
GroqRadioButton: TRadioButton;
MistralAIRadioButton: TRadioButton;
OpenAIRadioButton: TRadioButton;
OllamaRadioButton: TRadioButton;
VllmRadioButton: TRadioButton;
LitellmRadioButton: TRadioButton;
Exllamav2RadioButton: TRadioButton;
PythonLlamaCppRadioButton: TRadioButton;
HuggingfaceRadioButton: TRadioButton;
OptionsPage: TInputOptionWizardPage;
ElfRadioButton: TRadioButton;
OpenRouterRadioButton: TRadioButton;
GroqRadioButton: TRadioButton;
MistralAIRadioButton: TRadioButton;
OpenAIRadioButton: TRadioButton;
OllamaRadioButton: TRadioButton;
VllmRadioButton: TRadioButton;
LitellmRadioButton: TRadioButton;
Exllamav2RadioButton: TRadioButton;
PythonLlamaCppRadioButton: TRadioButton;
HuggingfaceRadioButton: TRadioButton;
RemoteLollmsRadioButton: TRadioButton;
XAIRadioButton: TRadioButton;
GeminiRadioButton: TRadioButton;
procedure InitializeWizard;
begin
OptionsPage := CreateInputOptionPage(wpSelectTasks,
'Custom Options', 'Select the desired binding to install by default',
'Please select one of the following options:',
False, False);
OptionsPage := CreateInputOptionPage(wpSelectTasks,
'Custom Options', 'Select the desired binding to install by default',
'Please select one of the following options:',
False, False);
ElfRadioButton := TRadioButton.Create(OptionsPage);
ElfRadioButton.Caption := 'elf';
ElfRadioButton.Checked := True;
ElfRadioButton.Parent := OptionsPage.Surface;
ElfRadioButton.Top := 0;
ElfRadioButton := TRadioButton.Create(OptionsPage);
ElfRadioButton.Caption := 'elf';
ElfRadioButton.Checked := True;
ElfRadioButton.Parent := OptionsPage.Surface;
ElfRadioButton.Top := 0;
OpenRouterRadioButton := TRadioButton.Create(OptionsPage);
OpenRouterRadioButton.Caption := 'openrouter';
OpenRouterRadioButton.Checked := False;
OpenRouterRadioButton.Parent := OptionsPage.Surface;
OpenRouterRadioButton.Top := ElfRadioButton.Top + ElfRadioButton.Height + 8;
OpenRouterRadioButton := TRadioButton.Create(OptionsPage);
OpenRouterRadioButton.Caption := 'openrouter';
OpenRouterRadioButton.Checked := False;
OpenRouterRadioButton.Parent := OptionsPage.Surface;
OpenRouterRadioButton.Top := ElfRadioButton.Top + ElfRadioButton.Height + 8;
GroqRadioButton := TRadioButton.Create(OptionsPage);
GroqRadioButton.Caption := 'groq';
GroqRadioButton.Checked := False;
GroqRadioButton.Parent := OptionsPage.Surface;
GroqRadioButton.Top := OpenRouterRadioButton.Top + OpenRouterRadioButton.Height + 8;
GroqRadioButton := TRadioButton.Create(OptionsPage);
GroqRadioButton.Caption := 'groq';
GroqRadioButton.Checked := False;
GroqRadioButton.Parent := OptionsPage.Surface;
GroqRadioButton.Top := OpenRouterRadioButton.Top + OpenRouterRadioButton.Height + 8;
MistralAIRadioButton := TRadioButton.Create(OptionsPage);
MistralAIRadioButton.Caption := 'mistralai';
MistralAIRadioButton.Checked := False;
MistralAIRadioButton.Parent := OptionsPage.Surface;
MistralAIRadioButton.Top := GroqRadioButton.Top + GroqRadioButton.Height + 8;
MistralAIRadioButton := TRadioButton.Create(OptionsPage);
MistralAIRadioButton.Caption := 'mistralai';
MistralAIRadioButton.Checked := False;
MistralAIRadioButton.Parent := OptionsPage.Surface;
MistralAIRadioButton.Top := GroqRadioButton.Top + GroqRadioButton.Height + 8;
OpenAIRadioButton := TRadioButton.Create(OptionsPage);
OpenAIRadioButton.Caption := 'openai';
OpenAIRadioButton.Checked := False;
OpenAIRadioButton.Parent := OptionsPage.Surface;
OpenAIRadioButton.Top := GroqRadioButton.Top + GroqRadioButton.Height + 8;
OpenAIRadioButton := TRadioButton.Create(OptionsPage);
OpenAIRadioButton.Caption := 'openai';
OpenAIRadioButton.Checked := False;
OpenAIRadioButton.Parent := OptionsPage.Surface;
OpenAIRadioButton.Top := MistralAIRadioButton.Top + MistralAIRadioButton.Height + 8;
OllamaRadioButton := TRadioButton.Create(OptionsPage);
OllamaRadioButton.Caption := 'ollama';
OllamaRadioButton.Checked := False;
OllamaRadioButton.Parent := OptionsPage.Surface;
OllamaRadioButton.Top := MistralAIRadioButton.Top + MistralAIRadioButton.Height + 8;
OllamaRadioButton := TRadioButton.Create(OptionsPage);
OllamaRadioButton.Caption := 'ollama';
OllamaRadioButton.Checked := False;
OllamaRadioButton.Parent := OptionsPage.Surface;
OllamaRadioButton.Top := OpenAIRadioButton.Top + OpenAIRadioButton.Height + 8;
VllmRadioButton := TRadioButton.Create(OptionsPage);
VllmRadioButton.Caption := 'vllm';
VllmRadioButton.Checked := False;
VllmRadioButton.Parent := OptionsPage.Surface;
VllmRadioButton.Top := OllamaRadioButton.Top + OllamaRadioButton.Height + 8;
VllmRadioButton := TRadioButton.Create(OptionsPage);
VllmRadioButton.Caption := 'vllm';
VllmRadioButton.Checked := False;
VllmRadioButton.Parent := OptionsPage.Surface;
VllmRadioButton.Top := OllamaRadioButton.Top + OllamaRadioButton.Height + 8;
LitellmRadioButton := TRadioButton.Create(OptionsPage);
LitellmRadioButton.Caption := 'litellm';
LitellmRadioButton.Checked := False;
LitellmRadioButton.Parent := OptionsPage.Surface;
LitellmRadioButton.Top := VllmRadioButton.Top + VllmRadioButton.Height + 8;
LitellmRadioButton := TRadioButton.Create(OptionsPage);
LitellmRadioButton.Caption := 'litellm';
LitellmRadioButton.Checked := False;
LitellmRadioButton.Parent := OptionsPage.Surface;
LitellmRadioButton.Top := VllmRadioButton.Top + VllmRadioButton.Height + 8;
Exllamav2RadioButton := TRadioButton.Create(OptionsPage);
Exllamav2RadioButton.Caption := 'exllamav2';
Exllamav2RadioButton.Checked := False;
Exllamav2RadioButton.Parent := OptionsPage.Surface;
Exllamav2RadioButton.Top := LitellmRadioButton.Top + LitellmRadioButton.Height + 8;
Exllamav2RadioButton := TRadioButton.Create(OptionsPage);
Exllamav2RadioButton.Caption := 'exllamav2';
Exllamav2RadioButton.Checked := False;
Exllamav2RadioButton.Parent := OptionsPage.Surface;
Exllamav2RadioButton.Top := LitellmRadioButton.Top + LitellmRadioButton.Height + 8;
PythonLlamaCppRadioButton := TRadioButton.Create(OptionsPage);
PythonLlamaCppRadioButton.Caption := 'python_llama_cpp';
PythonLlamaCppRadioButton.Checked := False;
PythonLlamaCppRadioButton.Parent := OptionsPage.Surface;
PythonLlamaCppRadioButton.Top := Exllamav2RadioButton.Top + Exllamav2RadioButton.Height + 8;
PythonLlamaCppRadioButton := TRadioButton.Create(OptionsPage);
PythonLlamaCppRadioButton.Caption := 'python_llama_cpp';
PythonLlamaCppRadioButton.Checked := False;
PythonLlamaCppRadioButton.Parent := OptionsPage.Surface;
PythonLlamaCppRadioButton.Top := Exllamav2RadioButton.Top + Exllamav2RadioButton.Height + 8;
HuggingfaceRadioButton := TRadioButton.Create(OptionsPage);
HuggingfaceRadioButton.Caption := 'huggingface';
HuggingfaceRadioButton.Checked := False;
HuggingfaceRadioButton.Parent := OptionsPage.Surface;
HuggingfaceRadioButton.Top := PythonLlamaCppRadioButton.Top + PythonLlamaCppRadioButton.Height + 8;
HuggingfaceRadioButton := TRadioButton.Create(OptionsPage);
HuggingfaceRadioButton.Caption := 'huggingface';
HuggingfaceRadioButton.Checked := False;
HuggingfaceRadioButton.Parent := OptionsPage.Surface;
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;
[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;
begin
if ElfRadioButton.Checked then
@ -177,25 +187,28 @@ begin
Result := '--python_llama_cpp'
else if HuggingfaceRadioButton.Checked then
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
Result := '';
end;
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep = ssPostInstall) and (GetSelectedOption('') = '') then
begin
MsgBox('An option must be selected for installation to continue.', mbError, MB_OK);
Abort;
end;
if (CurStep = ssPostInstall) and (GetSelectedOption('') = '') then
begin
MsgBox('An option must be selected for installation to continue.', mbError, MB_OK);
Abort;
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]
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 3) Local binding - python_llama_cpp
echo 4) Local binding - bs_exllamav2
echo 5) Remote binding - open_router
echo 6) Remote binding - open_ai
echo 7) Remote binding - mistral_ai
echo 5) Remote binding - groq
echo 6) Remote binding - open_router
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.
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%"=="3" goto :python_llama_cpp
if "%choice%"=="4" goto :bs_exllamav2
if "%choice%"=="5" goto :open_router
if "%choice%"=="6" goto :open_ai
if "%choice%"=="7" goto :mistral_ai
if "%choice%"=="5" goto :groq
if "%choice%"=="6" goto :open_router
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
:none
@ -157,6 +172,10 @@ goto :end
call python zoos/bindings_zoo/bs_exllamav2/__init__.py
goto :end
:groq
call python zoos/bindings_zoo/groq/__init__.py
goto :end
:open_router
call python zoos/bindings_zoo/open_router/__init__.py
goto :end
@ -169,6 +188,27 @@ goto :end
call python zoos/bindings_zoo/mistral_ai/__init__.py
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
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>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-6460d57e.js"></script>
<link rel="stylesheet" href="/assets/index-a719ae7b.css">
<script type="module" crossorigin src="/assets/index-14de4770.js"></script>
<link rel="stylesheet" href="/assets/index-b2ef28da.css">
</head>
<body>
<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="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
</h1>
<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">
<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)` }"
title="LoLLMS WebUI"
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">
<div v-show="leftPanelCollapsed" ><i data-feather='chevron-right'></i></div>
<div v-show="!leftPanelCollapsed" ><i data-feather='chevron-left'></i></div>