diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-23 10:09:14 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-26 09:07:03 +0000 |
commit | 63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f (patch) | |
tree | d58934cb48f9c953b19a0d0d5cffc0d0c5561471 /nixpkgs/pkgs/development/python-modules/langchain/default.nix | |
parent | c4eef3dacb2a3d359561f30917d9e3cc4e041be9 (diff) | |
parent | 91a22f76cd1716f9d0149e8a5c68424bb691de15 (diff) | |
download | nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.gz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.bz2 nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.lz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.xz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.zst nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/langchain/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/langchain/default.nix | 167 |
1 files changed, 98 insertions, 69 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/langchain/default.nix b/nixpkgs/pkgs/development/python-modules/langchain/default.nix index a2471639bd2f..df04d5b4659c 100644 --- a/nixpkgs/pkgs/development/python-modules/langchain/default.nix +++ b/nixpkgs/pkgs/development/python-modules/langchain/default.nix @@ -1,86 +1,91 @@ { lib +, bash , buildPythonPackage , fetchFromGitHub , pythonOlder +, pythonRelaxDepsHook , poetry-core -, numpy -, pyyaml -, sqlalchemy -, requests -, async-timeout , aiohttp +, async-timeout +, dataclasses-json +, langsmith , numexpr +, numpy , openapi-schema-pydantic -, dataclasses-json -, tqdm +, pydantic +, pyyaml +, requests +, sqlalchemy , tenacity -, bash # optional dependencies , anthropic +, atlassian-python-api +, azure-core +, azure-cosmos +, azure-identity +, beautifulsoup4 +, chardet , clarifai , cohere -, openai -, nlpcloud -, huggingface-hub -, manifest-ml -, torch -, transformers -, qdrant-client -, sentence-transformers -, azure-identity -, azure-cosmos -, azure-core +, duckduckgo-search , elasticsearch -, opensearch-py -, google-search-results +, esprima , faiss -, spacy -, nltk -, wikipedia -, beautifulsoup4 -, tiktoken -, jinja2 -, pinecone-client -, weaviate-client -, redis , google-api-python-client -, pypdf +, google-auth +, google-search-results +, gptcache +, html2text +, huggingface-hub +, jinja2 +, jq +, lark +, librosa +, lxml +, manifest-ml +, neo4j , networkx +, nlpcloud +, nltk +, openai +, opensearch-py +, pdfminer-six , pgvector +, pinecone-client , psycopg2 -, boto3 , pyowm +, pypdf , pytesseract -, html2text -, atlassian-python-api -, duckduckgo-search -, lark -, jq -, steamship -, pdfminer-six -, lxml -, chardet +, python-arango +, qdrant-client +, rdflib +, redis , requests-toolbelt -, neo4j -, langsmith +, sentence-transformers +, spacy +, steamship +, tiktoken +, torch +, transformers +, weaviate-client +, wikipedia # test dependencies -, pytest-vcr +, freezegun +, pandas +, pexpect , pytest-asyncio , pytest-mock , pytest-socket -, pandas +, pytest-vcr +, pytestCheckHook +, responses , syrupy , toml -, freezegun -, responses -, pexpect -, pytestCheckHook -, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "langchain"; - version = "0.0.247"; + version = "0.0.268"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -89,10 +94,10 @@ buildPythonPackage rec { owner = "hwchase17"; repo = "langchain"; rev = "refs/tags/v${version}"; - hash = "sha256-Eq9jXfVJuoiNWkJanol/tqQU+kOrftMii90743DeI3Y="; + hash = "sha256-x5cYtOY91JpW3vV7Q6JNNRoTFKGMu93TqBAhnhQ6pHE="; }; - sourceRoot = "source/libs/langchain"; + sourceRoot = "${src.name}/libs/langchain"; postPatch = '' substituteInPlace langchain/utilities/bash.py \ @@ -111,19 +116,20 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - numpy - pyyaml + pydantic sqlalchemy requests - aiohttp - numexpr + pyyaml + numpy openapi-schema-pydantic dataclasses-json - tqdm tenacity + aiohttp + numexpr + langsmith ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout - ] ++ passthru.optional-dependencies.all; + ]; passthru.optional-dependencies = { llms = [ @@ -131,17 +137,21 @@ buildPythonPackage rec { clarifai cohere openai + # openllm + # openlm nlpcloud huggingface-hub manifest-ml torch transformers + # xinference ]; qdrant = [ qdrant-client ]; openai = [ openai + tiktoken ]; text_helpers = [ chardet @@ -158,11 +168,18 @@ buildPythonPackage rec { embeddings = [ sentence-transformers ]; + javascript = [ + esprima + ]; azure = [ azure-identity azure-cosmos openai azure-core + # azure-ai-formrecognizer + # azure-ai-vision + # azure-cognitiveservices-speech + # azure-search-documents ]; all = [ anthropic @@ -191,6 +208,7 @@ buildPythonPackage rec { weaviate-client redis google-api-python-client + google-auth # wolframalpha qdrant-client # tensorflow-text @@ -199,14 +217,14 @@ buildPythonPackage rec { # nomic # aleph-alpha-client # deeplake + # libdeeplake pgvector psycopg2 - boto3 pyowm pytesseract html2text atlassian-python-api - # gptcache + gptcache duckduckgo-search # arxiv azure-identity @@ -229,22 +247,33 @@ buildPythonPackage rec { # azure-ai-formrecognizer # azure-ai-vision # azure-cognitiveservices-speech - langsmith + # momento + # singlestoredb + # tigrisdb + # nebula3-python + # awadb + # esprima + # octoai-sdk + rdflib + # amadeus + # xinference + librosa + python-arango ]; }; nativeCheckInputs = [ - pytestCheckHook - pytest-vcr + freezegun + pandas + pytest-asyncio pytest-mock pytest-socket - pytest-asyncio - pandas + pytest-vcr + pytestCheckHook + responses syrupy toml - freezegun - responses - ]; + ] ++ passthru.optional-dependencies.all; pytestFlagsArray = [ # integration_tests have many network, db access and require `OPENAI_API_KEY`, etc. |