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

View File

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