Skip to content

Commit

Permalink
python312Packages.lang*: update (#341921)
Browse files Browse the repository at this point in the history
  • Loading branch information
happysalada authored Sep 15, 2024
2 parents 04cc842 + db1cd9f commit 9753a25
Show file tree
Hide file tree
Showing 15 changed files with 139 additions and 77 deletions.
16 changes: 11 additions & 5 deletions pkgs/development/python-modules/langchain-aws/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
poetry-core,

# dependencies
boto3,
langchain-core,
numpy,
poetry-core,
pytestCheckHook,
pytest-asyncio,

# tests
langchain-standard-tests,
pytest-asyncio,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "langchain-aws";
version = "0.1.17";
version = "0.2.0";
pyproject = true;

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain-aws";
rev = "refs/tags/v${version}";
hash = "sha256-n9nQheuUZMrjZMpR3aqbrRb/AhcgiF4CFO9ROh9aFNc=";
hash = "sha256-P9CfAVpKh7djhUQc3DyyJTWqs9RbrTeLyynLei0x00o=";
};

postPatch = ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
{
lib,
azure-identity,
buildPythonPackage,
fetchFromGitHub,
freezegun,

# build-system
poetry-core,

# dependencies
azure-identity,
langchain-core,
langchain-openai,

# tests
freezegun,
lark,
pandas,
poetry-core,
pytest-asyncio,
pytest-mock,
pytest-socket,
pytestCheckHook,
pythonOlder,
requests-mock,
responses,
syrupy,
toml,

nix-update-script,
}:

buildPythonPackage rec {
pname = "langchain-azure-dynamic-sessions";
version = "0.1.0";
version = "0.2.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-azure-dynamic-sessions==${version}";
hash = "sha256-jz4IBMnWuk8FsSsyfLN14B0xWZrmZrvEW95a45S+FOo=";
hash = "sha256-tgvoOSr4tpi+tFBan+kw8FZUfUJHcQXv9e1nyeGP0so=";
};

sourceRoot = "${src.name}/libs/partners/azure-dynamic-sessions";
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/python-modules/langchain-chroma/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@

buildPythonPackage rec {
pname = "langchain-chroma";
version = "0.1.2";
version = "0.1.4";
pyproject = true;

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-chroma==${version}";
hash = "sha256-PQ3bepiAqzWhQdKofQSzQKxRrwI6dxBfSNV91462aJE=";
hash = "sha256-pU7H8OYXa+JjdkSO36xESPI6r3xA+9cFXxeJnfpYuHc=";
};

sourceRoot = "${src.name}/libs/partners/chroma";

build-system = [ poetry-core ];

pythonRelaxDeps = [ "chromadb" ];

dependencies = [
langchain-core
chromadb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
langchain-core,
langchain,
langsmith,
pydantic-settings,
pyyaml,
requests,
sqlalchemy,
Expand All @@ -37,26 +38,29 @@

buildPythonPackage rec {
pname = "langchain-community";
version = "0.2.16";
version = "0.3.0";
pyproject = true;

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-community==${version}";
hash = "sha256-0FKbx/ZPX7sioof5pMdqpnVWc46+eOiTIseyxwYK49E=";
hash = "sha256-8kF7KlXcWbquRtp8EumkFYhGd0onxifVZsts0SU1dzE=";
};

sourceRoot = "${src.name}/libs/community";

build-system = [ poetry-core ];

pythonRelaxDeps = [ "pydantic-settings" ];

dependencies = [
aiohttp
dataclasses-json
langchain-core
langchain
langsmith
pydantic-settings
pyyaml
requests
sqlalchemy
Expand Down
10 changes: 8 additions & 2 deletions pkgs/development/python-modules/langchain-core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@

buildPythonPackage rec {
pname = "langchain-core";
version = "0.2.38";
version = "0.3.0";
pyproject = true;

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-core==${version}";
hash = "sha256-3nRirzQe5KCVoeJ29fYelYuOD6r4adJof4NXreyfrzY=";
hash = "sha256-BCqrJuy7R2jT3QmTvYwn8gHX7bc6Tq8HArK+F3PjBhw=";
};

sourceRoot = "${src.name}/libs/core";
Expand Down Expand Up @@ -102,6 +102,12 @@ buildPythonPackage rec {
# Compares with machine-specific timings
"test_rate_limit_invoke"
"test_rate_limit_stream"
# flaky: assert (1726352133.7419367 - 1726352132.2697523) < 1
"test_benchmark_model"

# TypeError: exceptions must be derived from Warning, not <class 'NoneType'>
"test_chat_prompt_template_variable_names"
"test_create_model_v2"
]
++ lib.optionals stdenv.isDarwin [
# Langchain-core the following tests due to the test comparing execution time with magic values.
Expand Down
20 changes: 13 additions & 7 deletions pkgs/development/python-modules/langchain-huggingface/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,44 @@
lib,
buildPythonPackage,
fetchFromGitHub,
freezegun,

# build-system
poetry-core,

# dependencies
huggingface-hub,
langchain-core,
sentence-transformers,
tokenizers,
transformers,

# tests
freezegun,
httpx,
lark,
pandas,
poetry-core,
pytest-asyncio,
pytest-mock,
pytest-socket,
pytestCheckHook,
pythonOlder,
requests-mock,
responses,
syrupy,
toml,

nix-update-script,
}:

buildPythonPackage rec {
pname = "langchain-huggingface";
version = "0.0.3";
version = "0.1.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-huggingface==${version}";
hash = "sha256-4k3C6T2N7SBM/wP8KAwMQqt9DkXDdYNt2i/OkZilWw0=";
hash = "sha256-ESWhhjWjCbBV/3KjeSwEQzvK6os1mmc3at+8gonfGt4=";
};

sourceRoot = "${src.name}/libs/partners/huggingface";
Expand All @@ -51,6 +56,7 @@ buildPythonPackage rec {

nativeCheckInputs = [
freezegun
httpx
lark
pandas
pytest-asyncio
Expand Down
33 changes: 17 additions & 16 deletions pkgs/development/python-modules/langchain-mongodb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,42 @@
lib,
buildPythonPackage,
fetchFromGitHub,
freezegun,
langchain,

# build-system
poetry-core,

# dependencies
langchain-core,
numpy,
pymongo,

freezegun,
httpx,
langchain,
lark,
pandas,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pytest-mock,
pytest-socket,
pytestCheckHook,
pythonOlder,
requests-mock,
responses,
syrupy,
toml,

nix-update-script,
}:

buildPythonPackage rec {
pname = "langchain-mongodb";
version = "0.1.8";
version = "0.2.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-mongodb==${version}";
hash = "sha256-fjSvn9O/CrKBexcwuILXFR7AGx/tZtGDWjA0L6XV4Hk=";
hash = "sha256-Jd9toXkS9dGtSIrJQ/5W+swV1z2BJOJKBtkyGzj3oSc=";
};

sourceRoot = "${src.name}/libs/partners/mongodb";
Expand All @@ -41,22 +46,18 @@ buildPythonPackage rec {

dependencies = [
langchain-core
numpy
pymongo
];

nativeCheckInputs = [
freezegun
httpx
langchain
lark
pandas
pytest-asyncio
pytest-mock
pytest-socket
pytestCheckHook
requests-mock
responses
pytest-mock
syrupy
toml
];

pytestFlagsArray = [ "tests/unit_tests" ];
Expand Down
24 changes: 14 additions & 10 deletions pkgs/development/python-modules/langchain-openai/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,42 @@
lib,
buildPythonPackage,
fetchFromGitHub,
freezegun,

# build-system
poetry-core,

# dependencies
langchain-core,
langchain-standard-tests,
openai,
tiktoken,

# tests
freezegun,
langchain-standard-tests,
lark,
pandas,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pytest-mock,
pytest-socket,
pytestCheckHook,
pythonOlder,
requests-mock,
responses,
syrupy,
toml,

nix-update-script,
}:

buildPythonPackage rec {
pname = "langchain-openai";
version = "0.1.23";
version = "0.2.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-openai==${version}";
hash = "sha256-j+oaC0xmvDBsAREXwKF+kmFlplN43ROH6n9j1+H1ufk=";
hash = "sha256-3wTSvvPOMZciEqPxpcjrcqEpK//qwsEmvZnlZBfjltQ=";
};

sourceRoot = "${src.name}/libs/partners/openai";
Expand All @@ -57,9 +61,9 @@ buildPythonPackage rec {
lark
pandas
pytest-asyncio
pytestCheckHook
pytest-mock
pytest-socket
pytestCheckHook
requests-mock
responses
syrupy
Expand Down
Loading

0 comments on commit 9753a25

Please sign in to comment.