mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
Merge pull request #314161 from natsukium/langchain/update
python3Packages.langchain: 0.1.52 -> 0.2.1; add updateScript
This commit is contained in:
commit
8d3b5db8f5
@ -1,40 +1,55 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
pythonOlder,
|
||||
aiohttp,
|
||||
dataclasses-json,
|
||||
duckdb-engine,
|
||||
langchain,
|
||||
langchain-core,
|
||||
langsmith,
|
||||
lark,
|
||||
numpy,
|
||||
pandas,
|
||||
pytest-asyncio,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
pyyaml,
|
||||
requests,
|
||||
requests-mock,
|
||||
responses,
|
||||
sqlalchemy,
|
||||
syrupy,
|
||||
tenacity,
|
||||
toml,
|
||||
typer,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-community";
|
||||
version = "0.0.38";
|
||||
version = "0.2.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "langchain_community";
|
||||
inherit version;
|
||||
hash = "sha256-En/Et1vGe2L+gnxmwC5xWnMP74/mm9ICPUZrqwa1gQ0=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
rev = "langchain-community==${version}";
|
||||
hash = "sha256-h8ZJiQYmyvzaRrEVNS7SamJTq4zY7J1IgYdQiVBFh4I=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/community";
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
dataclasses-json
|
||||
langchain-core
|
||||
langchain
|
||||
langsmith
|
||||
numpy
|
||||
pyyaml
|
||||
@ -49,12 +64,29 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "langchain_community" ];
|
||||
|
||||
# PyPI source does not have tests
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
duckdb-engine
|
||||
lark
|
||||
pandas
|
||||
pytest-asyncio
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
requests-mock
|
||||
responses
|
||||
syrupy
|
||||
toml
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests/unit_tests" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = langchain-core.updateScript;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Community contributed LangChain integrations";
|
||||
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/community";
|
||||
changelog = "https://github.com/langchain-ai/langchain/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ natsukium ];
|
||||
};
|
||||
|
@ -1,33 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
anyio,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
freezegun,
|
||||
grandalf,
|
||||
jsonpatch,
|
||||
langsmith,
|
||||
numpy,
|
||||
packaging,
|
||||
poetry-core,
|
||||
pydantic,
|
||||
pytest-asyncio,
|
||||
pytest-mock,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pythonRelaxDepsHook,
|
||||
pyyaml,
|
||||
requests,
|
||||
syrupy,
|
||||
tenacity,
|
||||
writeScript,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-core";
|
||||
version = "0.1.52";
|
||||
version = "0.2.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "langchain_core";
|
||||
inherit version;
|
||||
hash = "sha256-CEw/xFL1ppZsKKs+xdvIuNJvw/YzeAc5KPTinZC2OT8=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
rev = "langchain-core==${version}";
|
||||
hash = "sha256-D0y6kW5bWcCKW2TwVPlZcAUxqADgsOm9fWySAjHYYIg=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/core";
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"langsmith"
|
||||
"packaging"
|
||||
@ -38,24 +48,46 @@ buildPythonPackage rec {
|
||||
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
||||
|
||||
dependencies = [
|
||||
anyio
|
||||
jsonpatch
|
||||
langsmith
|
||||
packaging
|
||||
pydantic
|
||||
pyyaml
|
||||
requests
|
||||
tenacity
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "langchain_core" ];
|
||||
|
||||
# PyPI source does not have tests
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
freezegun
|
||||
grandalf
|
||||
numpy
|
||||
pytest-asyncio
|
||||
pytest-mock
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
syrupy
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests/unit_tests" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nix-update
|
||||
|
||||
set -eu -o pipefail
|
||||
nix-update --commit --version-regex 'langchain-core==(.*)' python3Packages.langchain-core
|
||||
nix-update --commit --version-regex 'langchain-text-splitters==(.*)' python3Packages.langchain-text-splitters
|
||||
nix-update --commit --version-regex 'langchain==(.*)' python3Packages.langchain
|
||||
nix-update --commit --version-regex 'langchain-community==(.*)' python3Packages.langchain-community
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Building applications with LLMs through composability";
|
||||
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/core";
|
||||
changelog = "https://github.com/langchain-ai/langchain/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ natsukium ];
|
||||
};
|
||||
|
@ -1,41 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
langchain-core,
|
||||
lxml,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-text-splitters";
|
||||
version = "0.0.2";
|
||||
version = "0.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "langchain_text_splitters";
|
||||
inherit version;
|
||||
hash = "sha256-rIkn3AugjrpwL2lhye19986tjeGan3EBqyteo0IBs8E=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
rev = "refs/tags/langchain-text-splitters==${version}";
|
||||
hash = "sha256-QrgZ0j/YdOgEgLeQNSKjOIwqdr/Izuw9Gh6eKQ/00tQ=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/text-splitters";
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
dependencies = [
|
||||
langchain-core
|
||||
lxml
|
||||
];
|
||||
|
||||
# PyPI source does not have tests
|
||||
doCheck = false;
|
||||
dependencies = [ langchain-core ];
|
||||
|
||||
pythonImportsCheck = [ "langchain_text_splitters" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests/unit_tests" ];
|
||||
|
||||
passthru = {
|
||||
inherit (langchain-core) updateScript;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Build context-aware reasoning applications";
|
||||
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/text-splitters";
|
||||
changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.rev}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
|
@ -10,13 +10,10 @@
|
||||
chardet,
|
||||
clarifai,
|
||||
cohere,
|
||||
dataclasses-json,
|
||||
esprima,
|
||||
fetchFromGitHub,
|
||||
freezegun,
|
||||
huggingface-hub,
|
||||
jsonpatch,
|
||||
langchain-community,
|
||||
langchain-core,
|
||||
langchain-text-splitters,
|
||||
langsmith,
|
||||
@ -51,7 +48,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain";
|
||||
version = "0.1.52";
|
||||
version = "0.2.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -59,8 +56,8 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
rev = "refs/tags/langchain-core==${version}";
|
||||
hash = "sha256-H8rtysRIwyuJEUFI93vid3MsqReyRCER88xztsuYpOc=";
|
||||
rev = "refs/tags/langchain==${version}";
|
||||
hash = "sha256-cLJhdeft9XNLk5njSBaEBSuP31c2VFCJ1ET+ypo6mNY=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/langchain";
|
||||
@ -71,9 +68,6 @@ buildPythonPackage rec {
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
dataclasses-json
|
||||
jsonpatch
|
||||
langchain-community
|
||||
langchain-core
|
||||
langchain-text-splitters
|
||||
langsmith
|
||||
@ -166,6 +160,10 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "langchain" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = langchain-core.updateScript;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Building applications with LLMs through composability";
|
||||
homepage = "https://github.com/langchain-ai/langchain";
|
||||
|
Loading…
Reference in New Issue
Block a user