diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2024-03-26 16:12:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 16:12:17 +0100 |
commit | bc50837c0ef04954cdb89961042f11acafc43dd0 (patch) | |
tree | 4783b6e03f7894b3938ba85fd369b57bee03c53e /pkgs/development | |
parent | 994e8b66dde3ddfa32f3eeb7b0893f32d6a1dc06 (diff) | |
parent | b3246705addbe566bb3877dd3a1f022eab463fd6 (diff) |
Merge pull request #299110 from fabaff/llama-index-legacy-refactor
python311Packages.llama-index-legacy: 0.10.22 -> 0.9.48
Diffstat (limited to 'pkgs/development')
15 files changed, 365 insertions, 79 deletions
diff --git a/pkgs/development/python-modules/clarifai/default.nix b/pkgs/development/python-modules/clarifai/default.nix index a6a28221ce66c..54faa5fd47c81 100644 --- a/pkgs/development/python-modules/clarifai/default.nix +++ b/pkgs/development/python-modules/clarifai/default.nix @@ -17,13 +17,14 @@ , rich , schema , setuptools +, tabulate , tqdm , tritonclient }: buildPythonPackage rec { pname = "clarifai"; - version = "10.1.1"; + version = "10.2.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -32,7 +33,7 @@ buildPythonPackage rec { owner = "Clarifai"; repo = "clarifai-python"; rev = "refs/tags/${version}"; - hash = "sha256-36XceC40cL0SywY0Mus/s8OCO0ujWqxEIKZW+fvd7lw="; + hash = "sha256-jI85xMApeEd0Hl6h4Am5qxWoSSTWHsmb7FxUjJPmBQM="; }; pythonRelaxDeps = [ @@ -43,12 +44,12 @@ buildPythonPackage rec { "opencv-python" ]; - nativeBuildInputs = [ + build-system = [ pythonRelaxDepsHook setuptools ]; - propagatedBuildInputs = [ + dependencies = [ clarifai-grpc inquirerpy llama-index-core @@ -60,6 +61,7 @@ buildPythonPackage rec { pyyaml rich schema + tabulate tqdm tritonclient ]; @@ -87,6 +89,7 @@ buildPythonPackage rec { # Tests require network access and API key "tests/test_app.py" "tests/test_data_upload.py" + "tests/test_eval.py" "tests/test_model_predict.py" "tests/test_model_train.py" "tests/test_search.py" @@ -102,10 +105,10 @@ buildPythonPackage rec { meta = with lib; { description = "Clarifai Python Utilities"; - mainProgram = "clarifai"; homepage = "https://github.com/Clarifai/clarifai-python"; changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ natsukium ]; + mainProgram = "clarifai"; }; } diff --git a/pkgs/development/python-modules/llama-index-core/default.nix b/pkgs/development/python-modules/llama-index-core/default.nix index df6e3b92e2892..45b92fdae27bd 100644 --- a/pkgs/development/python-modules/llama-index-core/default.nix +++ b/pkgs/development/python-modules/llama-index-core/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { pname = "llama-index-core"; - version = "0.10.20"; + version = "0.10.23"; pyproject = true; disabled = pythonOlder "3.8"; @@ -39,7 +39,7 @@ buildPythonPackage rec { owner = "run-llama"; repo = "llama_index"; rev = "refs/tags/v${version}"; - hash = "sha256-F7k5gtmhFdn369Ws5PSJ/xTid6ONstoWPotk+DmDtLw="; + hash = "sha256-koFdHpcMX4Qg+LLDcjHx4wYxHnrJaAqebpba0ejINzo="; }; sourceRoot = "${src.name}/${pname}"; diff --git a/pkgs/development/python-modules/llama-index-embeddings-openai/default.nix b/pkgs/development/python-modules/llama-index-embeddings-openai/default.nix index 41e3843220f5d..00572d723d8f6 100644 --- a/pkgs/development/python-modules/llama-index-embeddings-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-embeddings-openai/default.nix @@ -1,28 +1,43 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , llama-index-core , poetry-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-embeddings-openai"; - - inherit (llama-index-core) version src meta; - + version = "0.1.7"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/embeddings/${pname}"; + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_embeddings_openai"; + inherit version; + hash = "sha256-xxzJggaAxM7fyYRdyHuU9oUdHMzh5Ib8kSmPj6jZ8n0="; + }; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.embeddings.openai" ]; + + meta = with lib; { + description = "LlamaIndex Embeddings Integration for OpenAI"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-s3"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-indices-managed-llama-cloud/default.nix b/pkgs/development/python-modules/llama-index-indices-managed-llama-cloud/default.nix index c778fb0e0512a..b0bc2e6f2d9e2 100644 --- a/pkgs/development/python-modules/llama-index-indices-managed-llama-cloud/default.nix +++ b/pkgs/development/python-modules/llama-index-indices-managed-llama-cloud/default.nix @@ -1,28 +1,43 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , poetry-core , llama-index-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-indices-managed-llama-cloud"; - - inherit (llama-index-core) version src meta; - + version = "0.1.5"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/indices/${pname}"; + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_indices_managed_llama_cloud"; + inherit version; + hash = "sha256-R83enwa73dUI8O/PQd5CXoUXGsLI/ail+yqJZz4cjHE="; + }; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.indices.managed.llama_cloud" ]; + + meta = with lib; { + description = "LlamaCloud Index and Retriever"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-legacy/default.nix b/pkgs/development/python-modules/llama-index-legacy/default.nix index e490c3db7e88d..120a210d8eeb0 100644 --- a/pkgs/development/python-modules/llama-index-legacy/default.nix +++ b/pkgs/development/python-modules/llama-index-legacy/default.nix @@ -1,24 +1,39 @@ { lib , buildPythonPackage -, fetchFromGitHub -, poetry-core +, fetchPypi , llama-index-core +, poetry-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-legacy"; - - inherit (llama-index-core) version src meta; - + version = "0.9.48"; pyproject = true; - sourceRoot = "${src.name}/${pname}"; + disabled = pythonOlder "3.8"; - nativeBuildInputs = [ + src = fetchPypi { + pname = "llama_index_legacy"; + inherit version; + hash = "sha256-gt3EaR7b9JUz1lWCwkm6IsA/6W+9PpL3dY3M7yjkODQ="; + }; + + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core ]; + + # Tests are only available in the mono repo + doCheck = false; + + meta = with lib; { + description = "LlamaIndex Readers Integration for files"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-legacy"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-llms-openai/default.nix b/pkgs/development/python-modules/llama-index-llms-openai/default.nix index c0b10abd02510..8678e80272c1c 100644 --- a/pkgs/development/python-modules/llama-index-llms-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-llms-openai/default.nix @@ -1,28 +1,43 @@ { lib , buildPythonPackage -, fetchFromGitHub -, poetry-core +, fetchPypi , llama-index-core +, poetry-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-llms-openai"; - - inherit (llama-index-core) version src meta; - + version = "0.1.12"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/llms/${pname}"; + disabled = pythonOlder "3.8"; - nativeBuildInputs = [ + src = fetchPypi { + pname = "llama_index_llms_openai"; + inherit version; + hash = "sha256-QAygCDlRvWaM6Lwkh1znC2NufbMosnxqUObRorCBueY="; + }; + + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.llms.openai" ]; + + meta = with lib; { + description = "LlamaIndex LLMS Integration for OpenAI"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/llms/llama-index-llms-openai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-multi-modal-llms-openai/default.nix b/pkgs/development/python-modules/llama-index-multi-modal-llms-openai/default.nix index 825b001f5c613..3df214e8bffdd 100644 --- a/pkgs/development/python-modules/llama-index-multi-modal-llms-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-multi-modal-llms-openai/default.nix @@ -1,30 +1,45 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , llama-index-core , llama-index-llms-openai , poetry-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-multi-modal-llms-openai"; - - inherit (llama-index-core) version src meta; - + version = "0.1.4"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/multi_modal_llms/${pname}"; + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_multi_modal_llms_openai"; + inherit version; + hash = "sha256-al1lhMM6nRsGz1yHTGOvJgP8k7ZgveSBqMVH6HbG4sM="; + }; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core llama-index-llms-openai ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.multi_modal_llms.openai" ]; + + meta = with lib; { + description = "LlamaIndex Multi-Modal-Llms Integration for OpenAI"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-openai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-program-openai/default.nix b/pkgs/development/python-modules/llama-index-program-openai/default.nix index d30bb7fb709ca..12b2f6a7ac9e0 100644 --- a/pkgs/development/python-modules/llama-index-program-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-program-openai/default.nix @@ -1,26 +1,31 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , llama-index-agent-openai , llama-index-core , llama-index-llms-openai , poetry-core +, pythonOlder }: buildPythonPackage rec { pname = "llama-index-program-openai"; - - inherit (llama-index-core) version src meta; - + version = "0.1.4"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/program/${pname}"; + disabled = pythonOlder "3.8"; - nativeBuildInputs = [ + src = fetchPypi { + pname = "llama_index_program_openai"; + inherit version; + hash = "sha256-Vz6Zot0WrTyvOCyKso0awQ6yVxvJSB2EptiYBq1qpdQ="; + }; + + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-agent-openai llama-index-core llama-index-llms-openai @@ -29,4 +34,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "llama_index.program.openai" ]; + + meta = with lib; { + description = "LlamaIndex Program Integration for OpenAI"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/program/llama-index-program-openai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-question-gen-openai/default.nix b/pkgs/development/python-modules/llama-index-question-gen-openai/default.nix index dc7f0986542fb..aa302019772a5 100644 --- a/pkgs/development/python-modules/llama-index-question-gen-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-question-gen-openai/default.nix @@ -25,15 +25,15 @@ buildPythonPackage rec { poetry-core ]; - # Tests are only available in the mono repo - doCheck = false; - dependencies = [ llama-index-core llama-index-llms-openai llama-index-program-openai ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.question_gen.openai" ]; diff --git a/pkgs/development/python-modules/llama-index-readers-database/default.nix b/pkgs/development/python-modules/llama-index-readers-database/default.nix new file mode 100644 index 0000000000000..b2e6c41f7265f --- /dev/null +++ b/pkgs/development/python-modules/llama-index-readers-database/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchPypi +, llama-index-core +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "llama-index-readers-database"; + version = "0.1.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_readers_database"; + inherit version; + hash = "sha256-9hbaUioGe8KVWX1O+Bwx0aOvJtVGb4lX/SZwYNJ/Xp0="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + llama-index-core + ]; + + # Tests are only available in the mono repo + doCheck = false; + + pythonImportsCheck = [ + "llama_index.readers.database" + ]; + + meta = with lib; { + description = "LlamaIndex Readers Integration for Databases"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-database"; + changelog = "https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/readers/llama-index-readers-database/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/llama-index-readers-s3/default.nix b/pkgs/development/python-modules/llama-index-readers-s3/default.nix new file mode 100644 index 0000000000000..0cc7c10661e2e --- /dev/null +++ b/pkgs/development/python-modules/llama-index-readers-s3/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchPypi +, llama-index-core +, llama-index-readers-file +, poetry-core +, pythonOlder +, s3fs +}: + +buildPythonPackage rec { + pname = "llama-index-readers-s3"; + version = "0.1.4"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_readers_s3"; + inherit version; + hash = "sha256-FjRIo0sJGJikX4T4Esew3pBxEp7E3kK7Ds2uXDJqMzQ="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + llama-index-core + llama-index-readers-file + s3fs + ]; + + # Tests are only available in the mono repo + doCheck = false; + + pythonImportsCheck = [ + "llama_index.readers.s3" + ]; + + meta = with lib; { + description = "LlamaIndex Readers Integration for S3"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-s3"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/llama-index-readers-twitter/default.nix b/pkgs/development/python-modules/llama-index-readers-twitter/default.nix new file mode 100644 index 0000000000000..88ffcd410bf94 --- /dev/null +++ b/pkgs/development/python-modules/llama-index-readers-twitter/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchPypi +, llama-index-core +, poetry-core +, pythonOlder +, tweepy +}: + +buildPythonPackage rec { + pname = "llama-index-readers-twitter"; + version = "0.1.3"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_readers_twitter"; + inherit version; + hash = "sha256-ZPwluiPdSkwMZ3JQy/HHhR7erYhUE9BWtplkfHk+TK8="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + llama-index-core + tweepy + ]; + + # Tests are only available in the mono repo + doCheck = false; + + pythonImportsCheck = [ + "llama_index.readers.twitter" + ]; + + meta = with lib; { + description = "LlamaIndex Readers Integration for Twitter"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-twitter"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/llama-index-readers-txtai/default.nix b/pkgs/development/python-modules/llama-index-readers-txtai/default.nix new file mode 100644 index 0000000000000..787026f8fc4b2 --- /dev/null +++ b/pkgs/development/python-modules/llama-index-readers-txtai/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, llama-index-core +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "llama-index-readers-txtai"; + version = "0.1.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_readers_txtai"; + inherit version; + hash = "sha256-F1P3/ZICFDTqowpqu0AF2RIKfLTH9Phuw0O+VsHpI4U="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + llama-index-core + ]; + + # Tests are only available in the mono repo + doCheck = false; + + pythonImportsCheck = [ + "llama_index.readers.txtai" + ]; + + meta = with lib; { + description = "LlamaIndex Readers Integration for txtai"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-txtai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/llama-index-readers-weather/default.nix b/pkgs/development/python-modules/llama-index-readers-weather/default.nix index 773c737f342dd..1778322d63b49 100644 --- a/pkgs/development/python-modules/llama-index-readers-weather/default.nix +++ b/pkgs/development/python-modules/llama-index-readers-weather/default.nix @@ -1,27 +1,31 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , llama-index-core , poetry-core , pyowm +, pythonOlder , pytestCheckHook }: buildPythonPackage rec { pname = "llama-index-readers-weather"; - version = "0.1.4"; - - inherit (llama-index-core) src meta; - + version = "0.1.3"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/readers/${pname}"; + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "llama_index_readers_weather"; + inherit version; + hash = "sha256-LJy2nU9f+yZZQm9stNn9mIqOkT5lOHaMIIm1Ezf2D0Q="; + }; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ llama-index-core pyowm ]; @@ -30,7 +34,17 @@ buildPythonPackage rec { pytestCheckHook ]; + # Tests are only available in the mono repo + doCheck = false; + pythonImportsCheck = [ "llama_index.readers.weather" ]; + + meta = with lib; { + description = "LlamaIndex Readers Integration for Weather"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-weather"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } diff --git a/pkgs/development/python-modules/llama-index-vector-stores-chroma/default.nix b/pkgs/development/python-modules/llama-index-vector-stores-chroma/default.nix index 62e89093066d7..8c546307434a1 100644 --- a/pkgs/development/python-modules/llama-index-vector-stores-chroma/default.nix +++ b/pkgs/development/python-modules/llama-index-vector-stores-chroma/default.nix @@ -1,41 +1,42 @@ { lib , buildPythonPackage , chromadb -, fetchFromGitHub +, fetchPypi , llama-index-core -, onnxruntime +, pythonOlder , poetry-core -, pythonRelaxDepsHook -, tokenizers }: buildPythonPackage rec { pname = "llama-index-vector-stores-chroma"; - - inherit (llama-index-core) version src meta; - + version = "0.1.6"; pyproject = true; - sourceRoot = "${src.name}/llama-index-integrations/vector_stores/${pname}"; + disabled = pythonOlder "3.8"; - pythonRelaxDeps = [ - "onnxruntime" - "tokenizers" - ]; + src = fetchPypi { + pname = "llama_index_vector_stores_chroma"; + inherit version; + hash = "sha256-bf89ydecQDn6Rs1Sjl5Lbe1kc+XvYyQkE0SRAH2k69s="; + }; - nativeBuildInputs = [ + build-system = [ poetry-core - pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ chromadb llama-index-core - onnxruntime - tokenizers ]; pythonImportsCheck = [ "llama_index.vector_stores.chroma" ]; + + meta = with lib; { + description = "LlamaIndex Vector Store Integration for Chroma"; + homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; } |