From b2beca6844736724782d4017a808fb613d077ee8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 22:55:24 +0200 Subject: [PATCH 01/21] python312Packages.openai: 1.13.3 -> 1.16.2 Diff: https://github.com/openai/openai-python/compare/refs/tags/v1.13.3...v1.16.2 Changelog: https://github.com/openai/openai-python/releases/tag/v1.16.2 --- pkgs/development/python-modules/openai/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index 7c8397dc304f..dbd7854174c9 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , pythonOlder , hatchling +, hatch-fancy-pypi-readme # propagated , httpx , pydantic @@ -26,7 +27,7 @@ buildPythonPackage rec { pname = "openai"; - version = "1.13.3"; + version = "1.16.2"; pyproject = true; disabled = pythonOlder "3.7.1"; @@ -35,14 +36,15 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "refs/tags/v${version}"; - hash = "sha256-8SHXUrPLZ7lgvB0jqZlcvKq5Zv2d2UqXjJpgiBpR8P8="; + hash = "sha256-7JWwEoVEdAy+tPcaYUPN7xA62Egzlv/2NNcDqvmDYh4="; }; - nativeBuildInputs = [ + build-system = [ hatchling + hatch-fancy-pypi-readme ]; - propagatedBuildInputs = [ + dependencies = [ httpx pydantic typing-extensions @@ -94,10 +96,10 @@ buildPythonPackage rec { meta = with lib; { description = "Python client library for the OpenAI API"; - mainProgram = "openai"; homepage = "https://github.com/openai/openai-python"; changelog = "https://github.com/openai/openai-python/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ malo ]; + mainProgram = "openai"; }; } From ec706c6b7d2254cba3167b82a622ff772e5def80 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 22:58:32 +0200 Subject: [PATCH 02/21] python312Packages.openai: format with nixfmt --- .../python-modules/openai/default.nix | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index dbd7854174c9..b61fc611b9d2 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -1,28 +1,26 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, hatchling -, hatch-fancy-pypi-readme -# propagated -, httpx -, pydantic -, typing-extensions -, anyio -, distro -, sniffio -, cached-property -, tqdm -# optional -, numpy -, pandas -, pandas-stubs -# tests -, pytestCheckHook -, pytest-asyncio -, pytest-mock -, respx -, dirty-equals +{ + lib, + anyio, + buildPythonPackage, + cached-property, + dirty-equals, + distro, + fetchFromGitHub, + hatch-fancy-pypi-readme, + hatchling, + httpx, + numpy, + pandas, + pandas-stubs, + pydantic, + pytest-asyncio, + pytest-mock, + pytestCheckHook, + pythonOlder, + respx, + sniffio, + tqdm, + typing-extensions, }: buildPythonPackage rec { @@ -52,9 +50,7 @@ buildPythonPackage rec { distro sniffio tqdm - ] ++ lib.optionals (pythonOlder "3.8") [ - cached-property - ]; + ] ++ lib.optionals (pythonOlder "3.8") [ cached-property ]; passthru.optional-dependencies = { datalib = [ @@ -64,9 +60,7 @@ buildPythonPackage rec { ]; }; - pythonImportsCheck = [ - "openai" - ]; + pythonImportsCheck = [ "openai" ]; nativeCheckInputs = [ pytestCheckHook @@ -77,7 +71,8 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ - "-W" "ignore::DeprecationWarning" + "-W" + "ignore::DeprecationWarning" ]; disabledTests = [ From b3d0930fe26a4a31b1975096248f337a6e704fcb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 22:59:06 +0200 Subject: [PATCH 03/21] python312Packages.llama-index-agent-openai: 0.2.1 -> 0.2.2 --- .../python-modules/llama-index-agent-openai/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-agent-openai/default.nix b/pkgs/development/python-modules/llama-index-agent-openai/default.nix index 35b473ad8ef6..791f91a28077 100644 --- a/pkgs/development/python-modules/llama-index-agent-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-agent-openai/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "llama-index-agent-openai"; - version = "0.2.1"; + version = "0.2.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_agent_openai"; inherit version; - hash = "sha256-ydCixD0vdSuA99PdflbhEsSd3b0Gl0lzFTz9uTdLYrQ="; + hash = "sha256-EgY92TLHQBV5b5c5hsxS14P1H9o45OrXKlbQ/RlZJe4="; }; pythonRelaxDeps = [ From 6c688e659af13be3ac3c9bd73ed7859ec9d785d7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 22:59:38 +0200 Subject: [PATCH 04/21] python312Packages.llama-index-agent-openai: format with nixfmt --- .../llama-index-agent-openai/default.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-agent-openai/default.nix b/pkgs/development/python-modules/llama-index-agent-openai/default.nix index 791f91a28077..1f8de109b1de 100644 --- a/pkgs/development/python-modules/llama-index-agent-openai/default.nix +++ b/pkgs/development/python-modules/llama-index-agent-openai/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, fetchPypi -, llama-index-core -, llama-index-llms-openai -, poetry-core -, pythonOlder -, pythonRelaxDepsHook +{ + lib, + buildPythonPackage, + fetchPypi, + llama-index-core, + llama-index-llms-openai, + poetry-core, + pythonOlder, + pythonRelaxDepsHook, }: buildPythonPackage rec { @@ -21,9 +22,7 @@ buildPythonPackage rec { hash = "sha256-EgY92TLHQBV5b5c5hsxS14P1H9o45OrXKlbQ/RlZJe4="; }; - pythonRelaxDeps = [ - "llama-index-llms-openai" - ]; + pythonRelaxDeps = [ "llama-index-llms-openai" ]; build-system = [ poetry-core @@ -35,9 +34,7 @@ buildPythonPackage rec { llama-index-llms-openai ]; - pythonImportsCheck = [ - "llama_index.agent.openai" - ]; + pythonImportsCheck = [ "llama_index.agent.openai" ]; meta = with lib; { description = "LlamaIndex Agent Integration for OpenAI"; From 566b0ca0ae70a663579830766b9d97eb9ec001fb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:00:08 +0200 Subject: [PATCH 05/21] python312Packages.llama-index-vector-stores-postgres: 0.1.4.post1 -> 0.1.5 --- .../llama-index-vector-stores-postgres/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix b/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix index 0fa3a9b23736..445f2b742303 100644 --- a/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix +++ b/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "llama-index-vector-stores-postgres"; - version = "0.1.4.post1"; + version = "0.1.5"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_vector_stores_postgres"; inherit version; - hash = "sha256-E75oSh9MH8aX00y//jhNbehqYdIm5HfEjb5Swn7J/cQ="; + hash = "sha256-9jE+1Gbx2y/CSqkpSfuYqgyX49yZwhwmJbiG/EHwTLw="; }; pythonRemoveDeps = [ From ecd51f18db4b33135ab4e86364eb9f9495a7510d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:00:30 +0200 Subject: [PATCH 06/21] python312Packages.llama-index-vector-stores-postgres: format with nixfmt --- .../default.nix | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix b/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix index 445f2b742303..e81dd0ab4d24 100644 --- a/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix +++ b/pkgs/development/python-modules/llama-index-vector-stores-postgres/default.nix @@ -1,13 +1,14 @@ -{ lib -, asyncpg -, buildPythonPackage -, fetchPypi -, llama-index-core -, pgvector -, poetry-core -, psycopg2 -, pythonRelaxDepsHook -, pythonOlder +{ + lib, + asyncpg, + buildPythonPackage, + fetchPypi, + llama-index-core, + pgvector, + poetry-core, + psycopg2, + pythonRelaxDepsHook, + pythonOlder, }: buildPythonPackage rec { @@ -23,9 +24,7 @@ buildPythonPackage rec { hash = "sha256-9jE+1Gbx2y/CSqkpSfuYqgyX49yZwhwmJbiG/EHwTLw="; }; - pythonRemoveDeps = [ - "psycopg2-binary" - ]; + pythonRemoveDeps = [ "psycopg2-binary" ]; build-system = [ poetry-core @@ -39,9 +38,7 @@ buildPythonPackage rec { psycopg2 ]; - pythonImportsCheck = [ - "llama_index.vector_stores.postgres" - ]; + pythonImportsCheck = [ "llama_index.vector_stores.postgres" ]; meta = with lib; { description = "LlamaIndex Vector Store Integration for Postgres"; From d2d234bb423de4a383d4a061413bc98ddf01a201 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:01:10 +0200 Subject: [PATCH 07/21] python312Packages.llama-index-vector-stores-qdrant: 0.1.5 -> 0.1.6 --- .../llama-index-vector-stores-qdrant/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix b/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix index 39727d6ef7f3..68bb799a8868 100644 --- a/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix +++ b/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "llama-index-vector-stores-qdrant"; - version = "0.1.5"; + version = "0.1.6"; pyproject = true; disabled = pythonOlder "3.8"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_vector_stores_qdrant"; inherit version; - hash = "sha256-Q4+ehywPz+jrA36AtU9yiicRr2nU6BCO6Y42j0SKPdI="; + hash = "sha256-MKmtxcHUqF3CzakGNXxvXy3jemoJNbdkCaqrgZ5Rtyo="; }; build-system = [ From 585cb03fe37d6e4f915d58b66cd64360b1179064 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:01:27 +0200 Subject: [PATCH 08/21] python312Packages.llama-index-vector-stores-qdrant: foramt with nixfmt --- .../default.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix b/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix index 68bb799a8868..195af9c19d2d 100644 --- a/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix +++ b/pkgs/development/python-modules/llama-index-vector-stores-qdrant/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, fetchPypi -, llama-index-core -, qdrant-client -, poetry-core -, grpcio -, pythonOlder +{ + lib, + buildPythonPackage, + fetchPypi, + llama-index-core, + qdrant-client, + poetry-core, + grpcio, + pythonOlder, }: buildPythonPackage rec { @@ -21,9 +22,7 @@ buildPythonPackage rec { hash = "sha256-MKmtxcHUqF3CzakGNXxvXy3jemoJNbdkCaqrgZ5Rtyo="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; dependencies = [ grpcio @@ -31,9 +30,7 @@ buildPythonPackage rec { qdrant-client ]; - pythonImportsCheck = [ - "llama_index.vector_stores.qdrant" - ]; + pythonImportsCheck = [ "llama_index.vector_stores.qdrant" ]; meta = with lib; { description = "LlamaIndex Vector Store Integration for Qdrant"; From b1762b488898837d9fddc574fd4c3da6d6697634 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:01:56 +0200 Subject: [PATCH 09/21] python312Packages.llamaindex-py-client: 0.1.15 -> 0.1.16 --- .../python-modules/llamaindex-py-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/llamaindex-py-client/default.nix b/pkgs/development/python-modules/llamaindex-py-client/default.nix index fb0cb4ad58ad..ce4a11a2f5fc 100644 --- a/pkgs/development/python-modules/llamaindex-py-client/default.nix +++ b/pkgs/development/python-modules/llamaindex-py-client/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "llamaindex-py-client"; - version = "0.1.15"; + version = "0.1.16"; pyproject = true; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "llamaindex_py_client"; inherit version; - hash = "sha256-x84mhVupdhU7tAFXw8GUIjxrdReZNbmI3UvWo/6Dqss="; + hash = "sha256-6Zu8CFXmyqp166IZzbPPbJQ66U+hXMu2ijoI1FL9Y4A="; }; nativeBuildInputs = [ From 226517435ee091ea99ff87954560a046546afefd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:02:19 +0200 Subject: [PATCH 10/21] python312Packages.llamaindex-py-client: format with nixfmt --- .../llamaindex-py-client/default.nix | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/llamaindex-py-client/default.nix b/pkgs/development/python-modules/llamaindex-py-client/default.nix index ce4a11a2f5fc..9b8b25fc2c09 100644 --- a/pkgs/development/python-modules/llamaindex-py-client/default.nix +++ b/pkgs/development/python-modules/llamaindex-py-client/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, fetchPypi -, httpx -, poetry-core -, pydantic -, pythonOlder +{ + lib, + buildPythonPackage, + fetchPypi, + httpx, + poetry-core, + pydantic, + pythonOlder, }: buildPythonPackage rec { @@ -20,9 +21,7 @@ buildPythonPackage rec { hash = "sha256-6Zu8CFXmyqp166IZzbPPbJQ66U+hXMu2ijoI1FL9Y4A="; }; - nativeBuildInputs = [ - poetry-core - ]; + nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ httpx @@ -32,9 +31,7 @@ buildPythonPackage rec { # Module has no tests doCheck = false; - pythonImportsCheck = [ - "llama_index_client" - ]; + pythonImportsCheck = [ "llama_index_client" ]; meta = with lib; { description = "Client for LlamaIndex"; From 42504c12b39972d83ccb580aae5a235170dc534a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:02:43 +0200 Subject: [PATCH 11/21] python312Packages.llamaindex-py-client: refactor --- .../python-modules/llamaindex-py-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/llamaindex-py-client/default.nix b/pkgs/development/python-modules/llamaindex-py-client/default.nix index 9b8b25fc2c09..d80b1b28ab9e 100644 --- a/pkgs/development/python-modules/llamaindex-py-client/default.nix +++ b/pkgs/development/python-modules/llamaindex-py-client/default.nix @@ -21,9 +21,9 @@ buildPythonPackage rec { hash = "sha256-6Zu8CFXmyqp166IZzbPPbJQ66U+hXMu2ijoI1FL9Y4A="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ httpx pydantic ]; From 67f6c7f4c12244e9957b871e8aed1a8be2308df9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:15:40 +0200 Subject: [PATCH 12/21] python312Packages.langchain-core: refactor --- .../python-modules/langchain-core/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/langchain-core/default.nix b/pkgs/development/python-modules/langchain-core/default.nix index d1a48870d255..42ed23f4f9d8 100644 --- a/pkgs/development/python-modules/langchain-core/default.nix +++ b/pkgs/development/python-modules/langchain-core/default.nix @@ -1,13 +1,13 @@ { lib +, anyio , buildPythonPackage , fetchPypi -, pythonOlder -, poetry-core -, anyio , jsonpatch , langsmith , packaging +, poetry-core , pydantic +, pythonOlder , pythonRelaxDepsHook , pyyaml , requests @@ -29,14 +29,18 @@ buildPythonPackage rec { pythonRelaxDeps = [ "langsmith" + "packaging" + ]; + + build-system = [ + poetry-core ]; nativeBuildInputs = [ - poetry-core pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ anyio jsonpatch langsmith From 43ba67614024f7918065b8c7a6bff11a9331ae9e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:15:59 +0200 Subject: [PATCH 13/21] python312Packages.langchain-core: format with nixfmt --- .../python-modules/langchain-core/default.nix | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/langchain-core/default.nix b/pkgs/development/python-modules/langchain-core/default.nix index 42ed23f4f9d8..19f66f77299e 100644 --- a/pkgs/development/python-modules/langchain-core/default.nix +++ b/pkgs/development/python-modules/langchain-core/default.nix @@ -1,17 +1,18 @@ -{ lib -, anyio -, buildPythonPackage -, fetchPypi -, jsonpatch -, langsmith -, packaging -, poetry-core -, pydantic -, pythonOlder -, pythonRelaxDepsHook -, pyyaml -, requests -, tenacity +{ + lib, + anyio, + buildPythonPackage, + fetchPypi, + jsonpatch, + langsmith, + packaging, + poetry-core, + pydantic, + pythonOlder, + pythonRelaxDepsHook, + pyyaml, + requests, + tenacity, }: buildPythonPackage rec { @@ -32,13 +33,9 @@ buildPythonPackage rec { "packaging" ]; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ anyio @@ -51,9 +48,7 @@ buildPythonPackage rec { tenacity ]; - pythonImportsCheck = [ - "langchain_core" - ]; + pythonImportsCheck = [ "langchain_core" ]; # PyPI source does not have tests doCheck = false; From d4c5adb202091a7d4a731fad975c0ab6935115ef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:16:31 +0200 Subject: [PATCH 14/21] python312Packages.langchain-community: format with nixfmt --- .../langchain-community/default.nix | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/langchain-community/default.nix b/pkgs/development/python-modules/langchain-community/default.nix index 95786643d458..476a4a22a349 100644 --- a/pkgs/development/python-modules/langchain-community/default.nix +++ b/pkgs/development/python-modules/langchain-community/default.nix @@ -1,18 +1,19 @@ -{ lib -, buildPythonPackage -, fetchPypi -, poetry-core -, pythonOlder -, aiohttp -, dataclasses-json -, langchain-core -, langsmith -, numpy -, pyyaml -, requests -, sqlalchemy -, tenacity -, typer +{ + lib, + buildPythonPackage, + fetchPypi, + poetry-core, + pythonOlder, + aiohttp, + dataclasses-json, + langchain-core, + langsmith, + numpy, + pyyaml, + requests, + sqlalchemy, + tenacity, + typer, }: buildPythonPackage rec { @@ -28,9 +29,7 @@ buildPythonPackage rec { hash = "sha256-2IEH+vqf4sVzPaljDGjZ7lHNM7HIiklQ56LZo49+eqM="; }; - nativeBuildInputs = [ - poetry-core - ]; + nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ aiohttp @@ -45,9 +44,7 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - cli = [ - typer - ]; + cli = [ typer ]; }; pythonImportsCheck = [ "langchain_community" ]; From a57a509ac99376ee4cbee3324f1b0ac916ba68f7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:17:28 +0200 Subject: [PATCH 15/21] python312Packages.langchain-community: refactor --- .../python-modules/langchain-community/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/langchain-community/default.nix b/pkgs/development/python-modules/langchain-community/default.nix index 476a4a22a349..29224e4ac59d 100644 --- a/pkgs/development/python-modules/langchain-community/default.nix +++ b/pkgs/development/python-modules/langchain-community/default.nix @@ -29,9 +29,9 @@ buildPythonPackage rec { hash = "sha256-2IEH+vqf4sVzPaljDGjZ7lHNM7HIiklQ56LZo49+eqM="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp dataclasses-json langchain-core From 9f53ca291c7b41ed6a8bcfcb1dc199e6a13b99f8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:18:03 +0200 Subject: [PATCH 16/21] python312Packages.langchain-core: 0.1.36 -> 0.1.40 --- pkgs/development/python-modules/langchain-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/langchain-core/default.nix b/pkgs/development/python-modules/langchain-core/default.nix index 19f66f77299e..20a98496dbf7 100644 --- a/pkgs/development/python-modules/langchain-core/default.nix +++ b/pkgs/development/python-modules/langchain-core/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "langchain-core"; - version = "0.1.36"; + version = "0.1.40"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "langchain_core"; inherit version; - hash = "sha256-qiQyNwyj0qXW3RSoEKpkiL8vYi/3oKPcMPbg7Z1/X6g="; + hash = "sha256-NMBvwObTU0tzjGP4VANEa0vnEWFmW34JH5uxnJFOwQA="; }; pythonRelaxDeps = [ From e0909945946041e628fcbec4067c50cf8e490921 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:18:29 +0200 Subject: [PATCH 17/21] python312Packages.langchain-community: 0.0.29 -> 0.0.31 --- .../python-modules/langchain-community/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/langchain-community/default.nix b/pkgs/development/python-modules/langchain-community/default.nix index 29224e4ac59d..a23a1df69c64 100644 --- a/pkgs/development/python-modules/langchain-community/default.nix +++ b/pkgs/development/python-modules/langchain-community/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "langchain-community"; - version = "0.0.29"; + version = "0.0.31"; pyproject = true; disabled = pythonOlder "3.8"; @@ -26,7 +26,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "langchain_community"; inherit version; - hash = "sha256-2IEH+vqf4sVzPaljDGjZ7lHNM7HIiklQ56LZo49+eqM="; + hash = "sha256-mpcLwrtZu0wgS2ltjGLCU09t2zEAUAXMG31/k05Ypfw="; }; build-system = [ poetry-core ]; From 6f5bb2b137bf0c2ae3f0ef836564bbf41ff333c3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:19:34 +0200 Subject: [PATCH 18/21] python312Packages.langsmith: format with nixfmt --- .../python-modules/langsmith/default.nix | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix index 3c2cee34008c..0ef4d4292eae 100644 --- a/pkgs/development/python-modules/langsmith/default.nix +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -1,16 +1,17 @@ -{ lib -, attr -, buildPythonPackage -, fetchFromGitHub -, freezegun -, orjson -, poetry-core -, pydantic -, pytest-asyncio -, pytestCheckHook -, pythonOlder -, pythonRelaxDepsHook -, requests +{ + lib, + attr, + buildPythonPackage, + fetchFromGitHub, + freezegun, + orjson, + poetry-core, + pydantic, + pytest-asyncio, + pytestCheckHook, + pythonOlder, + pythonRelaxDepsHook, + requests, }: buildPythonPackage rec { @@ -29,9 +30,7 @@ buildPythonPackage rec { sourceRoot = "${src.name}/python"; - pythonRelaxDeps = [ - "orjson" - ]; + pythonRelaxDeps = [ "orjson" ]; build-system = [ poetry-core @@ -59,7 +58,7 @@ buildPythonPackage rec { "test_as_runnable_batch" "test_as_runnable_async" "test_as_runnable_async_batch" - # requires git repo + # Test requires git repo "test_git_info" # Tests require OpenAI API key "test_chat_async_api" @@ -74,18 +73,16 @@ buildPythonPackage rec { "tests/unit_tests/test_client.py" ]; - pythonImportsCheck = [ - "langsmith" - ]; + pythonImportsCheck = [ "langsmith" ]; __darwinAllowLocalNetworking = true; meta = with lib; { description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform"; - mainProgram = "langsmith"; homepage = "https://github.com/langchain-ai/langsmith-sdk"; changelog = "https://github.com/langchain-ai/langsmith-sdk/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ natsukium ]; + mainProgram = "langsmith"; }; } From bbd98a9a265c9b8a5ef35dc111c394b7cfa477f5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:20:08 +0200 Subject: [PATCH 19/21] python312Packages.langsmith: 0.1.38 -> 0.1.40 Diff: https://github.com/langchain-ai/langsmith-sdk/compare/refs/tags/v0.1.38...v0.1.40 Changelog: https://github.com/langchain-ai/langsmith-sdk/releases/tag/v0.1.40 --- pkgs/development/python-modules/langsmith/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix index 0ef4d4292eae..6c340d28211e 100644 --- a/pkgs/development/python-modules/langsmith/default.nix +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "langsmith"; - version = "0.1.38"; + version = "0.1.40"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "langchain-ai"; repo = "langsmith-sdk"; rev = "refs/tags/v${version}"; - hash = "sha256-hK9zPEmO0LaRnbLTbc9ABE9a7UAZU9yZZUswu955CJU="; + hash = "sha256-LdHCTPFrIhIOWV4m9pJx7GWQX1Xs6ajaXMgPFO+JQ8w="; }; sourceRoot = "${src.name}/python"; From 2b0e1c9b1e2ae2448b75b124df29c45628981340 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:27:23 +0200 Subject: [PATCH 20/21] python312Packages.langchain: 0.1.13 -> 0.1.14 Diff: https://github.com/langchain-ai/langchain/compare/refs/tags/v0.1.13...v0.1.14 Changelog: https://github.com/langchain-ai/langchain/releases/tag/v0.1.14 --- .../python-modules/langchain/default.nix | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/langchain/default.nix b/pkgs/development/python-modules/langchain/default.nix index 1fc9cd416ecd..849d8513af36 100644 --- a/pkgs/development/python-modules/langchain/default.nix +++ b/pkgs/development/python-modules/langchain/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { pname = "langchain"; - version = "0.1.13"; + version = "0.1.14"; pyproject = true; disabled = pythonOlder "3.8"; @@ -61,12 +61,12 @@ buildPythonPackage rec { owner = "langchain-ai"; repo = "langchain"; rev = "refs/tags/v${version}"; - hash = "sha256-tBEO0GOY1cqO5FOYnBXAOSupSRhcoI9u4Nu4FieId74="; + hash = "sha256-wV6QFeJ/kV0nDVlA2qsJ9p1n3Yxy8Q/NZ1IX8cFtzcg="; }; sourceRoot = "${src.name}/libs/langchain"; - nativeBuildInputs = [ + build-system = [ poetry-core ]; @@ -74,7 +74,7 @@ buildPythonPackage rec { bash ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp dataclasses-json jsonpatch @@ -162,21 +162,24 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ - # integration_tests have many network, db access and require `OPENAI_API_KEY`, etc. + # integration_tests require network access, database access and require `OPENAI_API_KEY`, etc. "tests/unit_tests" "--only-core" ]; disabledTests = [ - # these tests have db access + # These tests have database access "test_table_info" "test_sql_database_run" - - # these tests have network access + # These tests have network access "test_socket_disabled" - - # this test may require a specific version of langchain-community + "test_openai_agent_with_streaming" + "test_openai_agent_tools_agent" + # This test may require a specific version of langchain-community "test_compatible_vectorstore_documentation" + # AssertionErrors + "test_callback_handlers" + "test_generic_fake_chat_model" ]; pythonImportsCheck = [ @@ -185,10 +188,10 @@ buildPythonPackage rec { meta = with lib; { description = "Building applications with LLMs through composability"; - mainProgram = "langchain-server"; homepage = "https://github.com/langchain-ai/langchain"; changelog = "https://github.com/langchain-ai/langchain/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ natsukium ]; + mainProgram = "langchain-server"; }; } From d0698b4090a313cb7d6383024171dabb5aa15962 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 23:28:36 +0200 Subject: [PATCH 21/21] python312Packages.langchain: format with nixfmt --- .../python-modules/langchain/default.nix | 146 ++++++++---------- 1 file changed, 61 insertions(+), 85 deletions(-) diff --git a/pkgs/development/python-modules/langchain/default.nix b/pkgs/development/python-modules/langchain/default.nix index 849d8513af36..3b8cc793697d 100644 --- a/pkgs/development/python-modules/langchain/default.nix +++ b/pkgs/development/python-modules/langchain/default.nix @@ -1,53 +1,52 @@ -{ lib -, bash -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, poetry-core -, aiohttp -, async-timeout -, dataclasses-json -, jsonpatch -, langsmith -, langchain-core -, langchain-community -, langchain-text-splitters -, numpy -, pydantic -, pyyaml -, requests -, sqlalchemy -, tenacity - # optional dependencies -, azure-core -, azure-cosmos -, azure-identity -, chardet -, clarifai -, cohere -, esprima -, huggingface-hub -, lark -, manifest-ml -, nlpcloud -, openai -, qdrant-client -, sentence-transformers -, tiktoken -, torch -, transformers -, typer - # test dependencies -, freezegun -, pandas -, pytest-asyncio -, pytest-mock -, pytest-socket -, pytestCheckHook -, requests-mock -, responses -, syrupy -, toml +{ + lib, + aiohttp, + async-timeout, + azure-core, + azure-cosmos, + azure-identity, + bash, + buildPythonPackage, + chardet, + clarifai, + cohere, + dataclasses-json, + esprima, + fetchFromGitHub, + freezegun, + huggingface-hub, + jsonpatch, + langchain-community, + langchain-core, + langchain-text-splitters, + langsmith, + lark, + manifest-ml, + nlpcloud, + numpy, + openai, + pandas, + poetry-core, + pydantic, + pytest-asyncio, + pytest-mock, + pytest-socket, + pytestCheckHook, + pythonOlder, + pyyaml, + qdrant-client, + requests-mock, + requests, + responses, + sentence-transformers, + sqlalchemy, + syrupy, + tenacity, + tiktoken, + toml, + torch, + transformers, + typer, }: buildPythonPackage rec { @@ -66,13 +65,9 @@ buildPythonPackage rec { sourceRoot = "${src.name}/libs/langchain"; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - buildInputs = [ - bash - ]; + buildInputs = [ bash ]; dependencies = [ aiohttp @@ -88,9 +83,7 @@ buildPythonPackage rec { requests sqlalchemy tenacity - ] ++ lib.optionals (pythonOlder "3.11") [ - async-timeout - ]; + ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; passthru.optional-dependencies = { llms = [ @@ -104,31 +97,19 @@ buildPythonPackage rec { torch transformers ]; - qdrant = [ - qdrant-client - ]; + qdrant = [ qdrant-client ]; openai = [ openai tiktoken ]; - text_helpers = [ - chardet - ]; - clarifai = [ - clarifai - ]; - cohere = [ - cohere - ]; + text_helpers = [ chardet ]; + clarifai = [ clarifai ]; + cohere = [ cohere ]; docarray = [ # docarray ]; - embeddings = [ - sentence-transformers - ]; - javascript = [ - esprima - ]; + embeddings = [ sentence-transformers ]; + javascript = [ esprima ]; azure = [ azure-identity azure-cosmos @@ -140,11 +121,8 @@ buildPythonPackage rec { # azure-search-documents # azure-ai-textanalytics ]; - all = [ - ]; - cli = [ - typer - ]; + all = [ ]; + cli = [ typer ]; }; nativeCheckInputs = [ @@ -182,9 +160,7 @@ buildPythonPackage rec { "test_generic_fake_chat_model" ]; - pythonImportsCheck = [ - "langchain" - ]; + pythonImportsCheck = [ "langchain" ]; meta = with lib; { description = "Building applications with LLMs through composability";