diff --git a/pkgs/development/python-modules/langchain-community/default.nix b/pkgs/development/python-modules/langchain-community/default.nix index 95786643d458..a23a1df69c64 100644 --- a/pkgs/development/python-modules/langchain-community/default.nix +++ b/pkgs/development/python-modules/langchain-community/default.nix @@ -1,23 +1,24 @@ -{ 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 { pname = "langchain-community"; - version = "0.0.29"; + version = "0.0.31"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,14 +26,12 @@ buildPythonPackage rec { src = fetchPypi { pname = "langchain_community"; inherit version; - hash = "sha256-2IEH+vqf4sVzPaljDGjZ7lHNM7HIiklQ56LZo49+eqM="; + hash = "sha256-mpcLwrtZu0wgS2ltjGLCU09t2zEAUAXMG31/k05Ypfw="; }; - nativeBuildInputs = [ - poetry-core - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp dataclasses-json langchain-core @@ -45,9 +44,7 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - cli = [ - typer - ]; + cli = [ typer ]; }; pythonImportsCheck = [ "langchain_community" ]; diff --git a/pkgs/development/python-modules/langchain-core/default.nix b/pkgs/development/python-modules/langchain-core/default.nix index d1a48870d255..20a98496dbf7 100644 --- a/pkgs/development/python-modules/langchain-core/default.nix +++ b/pkgs/development/python-modules/langchain-core/default.nix @@ -1,22 +1,23 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pythonOlder -, poetry-core -, anyio -, jsonpatch -, langsmith -, packaging -, pydantic -, pythonRelaxDepsHook -, pyyaml -, requests -, tenacity +{ + lib, + anyio, + buildPythonPackage, + fetchPypi, + jsonpatch, + langsmith, + packaging, + poetry-core, + pydantic, + pythonOlder, + pythonRelaxDepsHook, + pyyaml, + requests, + tenacity, }: buildPythonPackage rec { pname = "langchain-core"; - version = "0.1.36"; + version = "0.1.40"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,19 +25,19 @@ buildPythonPackage rec { src = fetchPypi { pname = "langchain_core"; inherit version; - hash = "sha256-qiQyNwyj0qXW3RSoEKpkiL8vYi/3oKPcMPbg7Z1/X6g="; + hash = "sha256-NMBvwObTU0tzjGP4VANEa0vnEWFmW34JH5uxnJFOwQA="; }; pythonRelaxDeps = [ "langsmith" + "packaging" ]; - nativeBuildInputs = [ - poetry-core - pythonRelaxDepsHook - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + dependencies = [ anyio jsonpatch langsmith @@ -47,9 +48,7 @@ buildPythonPackage rec { tenacity ]; - pythonImportsCheck = [ - "langchain_core" - ]; + pythonImportsCheck = [ "langchain_core" ]; # PyPI source does not have tests doCheck = false; diff --git a/pkgs/development/python-modules/langchain/default.nix b/pkgs/development/python-modules/langchain/default.nix index 1fc9cd416ecd..3b8cc793697d 100644 --- a/pkgs/development/python-modules/langchain/default.nix +++ b/pkgs/development/python-modules/langchain/default.nix @@ -1,58 +1,57 @@ -{ 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 { pname = "langchain"; - version = "0.1.13"; + version = "0.1.14"; pyproject = true; disabled = pythonOlder "3.8"; @@ -61,20 +60,16 @@ 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 = [ - poetry-core - ]; + build-system = [ poetry-core ]; - buildInputs = [ - bash - ]; + buildInputs = [ bash ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp dataclasses-json jsonpatch @@ -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 = [ @@ -162,33 +140,34 @@ 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 = [ - "langchain" - ]; + pythonImportsCheck = [ "langchain" ]; 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"; }; } diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix index 3c2cee34008c..6c340d28211e 100644 --- a/pkgs/development/python-modules/langsmith/default.nix +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -1,21 +1,22 @@ -{ 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 { pname = "langsmith"; - version = "0.1.38"; + version = "0.1.40"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,14 +25,12 @@ buildPythonPackage rec { owner = "langchain-ai"; repo = "langsmith-sdk"; rev = "refs/tags/v${version}"; - hash = "sha256-hK9zPEmO0LaRnbLTbc9ABE9a7UAZU9yZZUswu955CJU="; + hash = "sha256-LdHCTPFrIhIOWV4m9pJx7GWQX1Xs6ajaXMgPFO+JQ8w="; }; 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"; }; } 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..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,16 +1,17 @@ -{ 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 { pname = "llama-index-agent-openai"; - version = "0.2.1"; + version = "0.2.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -18,12 +19,10 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_agent_openai"; inherit version; - hash = "sha256-ydCixD0vdSuA99PdflbhEsSd3b0Gl0lzFTz9uTdLYrQ="; + 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"; 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..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,18 +1,19 @@ -{ 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 { pname = "llama-index-vector-stores-postgres"; - version = "0.1.4.post1"; + version = "0.1.5"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,12 +21,10 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_vector_stores_postgres"; inherit version; - hash = "sha256-E75oSh9MH8aX00y//jhNbehqYdIm5HfEjb5Swn7J/cQ="; + 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"; 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..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,16 +1,17 @@ -{ 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 { pname = "llama-index-vector-stores-qdrant"; - version = "0.1.5"; + version = "0.1.6"; pyproject = true; disabled = pythonOlder "3.8"; @@ -18,12 +19,10 @@ buildPythonPackage rec { src = fetchPypi { pname = "llama_index_vector_stores_qdrant"; inherit version; - hash = "sha256-Q4+ehywPz+jrA36AtU9yiicRr2nU6BCO6Y42j0SKPdI="; + 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"; diff --git a/pkgs/development/python-modules/llamaindex-py-client/default.nix b/pkgs/development/python-modules/llamaindex-py-client/default.nix index fb0cb4ad58ad..d80b1b28ab9e 100644 --- a/pkgs/development/python-modules/llamaindex-py-client/default.nix +++ b/pkgs/development/python-modules/llamaindex-py-client/default.nix @@ -1,15 +1,16 @@ -{ lib -, buildPythonPackage -, fetchPypi -, httpx -, poetry-core -, pydantic -, pythonOlder +{ + lib, + buildPythonPackage, + fetchPypi, + httpx, + poetry-core, + pydantic, + pythonOlder, }: buildPythonPackage rec { pname = "llamaindex-py-client"; - version = "0.1.15"; + version = "0.1.16"; pyproject = true; disabled = pythonOlder "3.8"; @@ -17,14 +18,12 @@ buildPythonPackage rec { src = fetchPypi { pname = "llamaindex_py_client"; inherit version; - hash = "sha256-x84mhVupdhU7tAFXw8GUIjxrdReZNbmI3UvWo/6Dqss="; + hash = "sha256-6Zu8CFXmyqp166IZzbPPbJQ66U+hXMu2ijoI1FL9Y4A="; }; - nativeBuildInputs = [ - poetry-core - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ httpx pydantic ]; @@ -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"; diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index 7c8397dc304f..b61fc611b9d2 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -1,32 +1,31 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, hatchling -# 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 { pname = "openai"; - version = "1.13.3"; + version = "1.16.2"; pyproject = true; disabled = pythonOlder "3.7.1"; @@ -35,14 +34,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 @@ -50,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 = [ @@ -62,9 +60,7 @@ buildPythonPackage rec { ]; }; - pythonImportsCheck = [ - "openai" - ]; + pythonImportsCheck = [ "openai" ]; nativeCheckInputs = [ pytestCheckHook @@ -75,7 +71,8 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ - "-W" "ignore::DeprecationWarning" + "-W" + "ignore::DeprecationWarning" ]; disabledTests = [ @@ -94,10 +91,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"; }; }