Pol Dellaiera 2024-11-20 12:24:18 +01:00
parent 66c4e8d3e9
commit 6416e8b570

View File

@ -2,24 +2,24 @@
lib, lib,
buildNpmPackage, buildNpmPackage,
fetchFromGitHub, fetchFromGitHub,
python311, python312,
nixosTests, nixosTests,
}: }:
let let
pname = "open-webui"; pname = "open-webui";
version = "0.3.35"; version = "0.4.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "open-webui"; owner = "open-webui";
repo = "open-webui"; repo = "open-webui";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-H46qoOEajPKRU/Lbd6r7r0vRjWSd7uGoA0deaDv6HSw="; hash = "sha256-OVj7yAHN3XMeqTa1oZIxEz9cwt4kW1ng+bwD44y/qQA=";
}; };
frontend = buildNpmPackage { frontend = buildNpmPackage {
inherit pname version src; inherit pname version src;
npmDepsHash = "sha256-ohWSfwZfC/jfOpnNSqsvMyYnukk3Xa3Tq32PAl8Ds60="; npmDepsHash = "sha256-qT7oqOZSZjicsFnd7nsnGvW5ifAV16Ah/fPSaKlf7fw=";
# Disabling `pyodide:fetch` as it downloads packages during `buildPhase` # Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
# Until this is solved, running python packages from the browser will not work. # Until this is solved, running python packages from the browser will not work.
@ -41,7 +41,7 @@ let
''; '';
}; };
in in
python311.pkgs.buildPythonApplication rec { python312.pkgs.buildPythonApplication rec {
inherit pname version src; inherit pname version src;
pyproject = true; pyproject = true;
@ -61,7 +61,8 @@ python311.pkgs.buildPythonApplication rec {
"pytest-docker" "pytest-docker"
]; ];
dependencies = with python311.pkgs; [ dependencies = with python312.pkgs; [
aiocache
aiohttp aiohttp
alembic alembic
anthropic anthropic
@ -86,22 +87,24 @@ python311.pkgs.buildPythonApplication rec {
flask-cors flask-cors
fpdf2 fpdf2
ftfy ftfy
qdrant-client
google-generativeai google-generativeai
googleapis-common-protos googleapis-common-protos
langchain langchain
langchain-chroma langchain-chroma
langchain-community langchain-community
langfuse langfuse
ldap3
markdown markdown
nltk nltk
openai openai
opencv-python-headless opencv-python-headless
openpyxl openpyxl
opensearch-py
pandas pandas
passlib passlib
peewee peewee
peewee-migrate peewee-migrate
pgvector
psutil psutil
psycopg2-binary psycopg2-binary
pydub pydub
@ -119,21 +122,22 @@ python311.pkgs.buildPythonApplication rec {
python-socketio python-socketio
pytube pytube
pyxlsb pyxlsb
qdrant-client
rank-bm25 rank-bm25
rapidocr-onnxruntime rapidocr-onnxruntime
redis redis
requests requests
sentence-transformers sentence-transformers
soundfile
tiktoken tiktoken
unstructured unstructured
uvicorn uvicorn
validators validators
xhtml2pdf
xlrd xlrd
youtube-transcript-api youtube-transcript-api
]; ];
build-system = with python311.pkgs; [ hatchling ]; build-system = with python312.pkgs; [ hatchling ];
pythonImportsCheck = [ "open_webui" ]; pythonImportsCheck = [ "open_webui" ];
@ -144,11 +148,11 @@ python311.pkgs.buildPythonApplication rec {
}; };
meta = { meta = {
changelog = "https://github.com/open-webui/open-webui/blob/${src.rev}/CHANGELOG.md";
description = "Comprehensive suite for LLMs with a user-friendly WebUI"; description = "Comprehensive suite for LLMs with a user-friendly WebUI";
homepage = "https://github.com/open-webui/open-webui"; homepage = "https://github.com/open-webui/open-webui";
changelog = "https://github.com/open-webui/open-webui/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ shivaraj-bh ];
mainProgram = "open-webui"; mainProgram = "open-webui";
maintainers = with lib.maintainers; [ shivaraj-bh ];
}; };
} }