about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/langchain/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/langchain/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/langchain/default.nix132
1 files changed, 16 insertions, 116 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/langchain/default.nix b/nixpkgs/pkgs/development/python-modules/langchain/default.nix
index c2fabc40c03a..d39942c769ac 100644
--- a/nixpkgs/pkgs/development/python-modules/langchain/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/langchain/default.nix
@@ -6,11 +6,12 @@
 , pythonRelaxDepsHook
 , poetry-core
 , aiohttp
-, anyio
 , async-timeout
 , dataclasses-json
 , jsonpatch
 , langsmith
+, langchain-core
+, langchain-community
 , numpy
 , pydantic
 , pyyaml
@@ -18,60 +19,27 @@
 , sqlalchemy
 , tenacity
   # optional dependencies
-, atlassian-python-api
 , azure-core
 , azure-cosmos
 , azure-identity
-, beautifulsoup4
 , chardet
 , clarifai
 , cohere
-, duckduckgo-search
-, elasticsearch
 , esprima
-, faiss
-, google-api-python-client
-, 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
-, pymongo
-, pyowm
-, pypdf
-, pytesseract
-, python-arango
 , qdrant-client
-, rdflib
-, redis
-, requests-toolbelt
 , sentence-transformers
 , tiktoken
 , torch
 , transformers
 , typer
-, weaviate-client
-, wikipedia
   # test dependencies
 , freezegun
 , pandas
-, pexpect
 , pytest-asyncio
 , pytest-mock
 , pytest-socket
@@ -84,16 +52,16 @@
 
 buildPythonPackage rec {
   pname = "langchain";
-  version = "0.0.334";
+  version = "0.1.0";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
-    owner = "hwchase17";
+    owner = "langchain-ai";
     repo = "langchain";
     rev = "refs/tags/v${version}";
-    hash = "sha256-mXPqc8wF9DhEtITm8h5R9kHBcMJ7AEK4kL5Z7V2p8NE=";
+    hash = "sha256-izaSah1S0INsskdzE9b7Iw4yWBsNmN5fBI6BQgaHgE4=";
   };
 
   sourceRoot = "${src.name}/libs/langchain";
@@ -108,17 +76,18 @@ buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = [
+    langchain-core
+    langchain-community
     pydantic
     sqlalchemy
     requests
     pyyaml
     numpy
-    dataclasses-json
-    tenacity
     aiohttp
-    langsmith
-    anyio
+    tenacity
     jsonpatch
+    dataclasses-json
+    langsmith
   ] ++ lib.optionals (pythonOlder "3.11") [
     async-timeout
   ];
@@ -169,81 +138,9 @@ buildPythonPackage rec {
       # azure-ai-vision
       # azure-cognitiveservices-speech
       # azure-search-documents
+      # azure-ai-textanalytics
     ];
     all = [
-      clarifai
-      cohere
-      openai
-      nlpcloud
-      huggingface-hub
-      manifest-ml
-      elasticsearch
-      opensearch-py
-      google-search-results
-      faiss
-      sentence-transformers
-      transformers
-      nltk
-      wikipedia
-      beautifulsoup4
-      tiktoken
-      torch
-      jinja2
-      pinecone-client
-      # pinecone-text
-      # marqo
-      pymongo
-      weaviate-client
-      redis
-      google-api-python-client
-      google-auth
-      # wolframalpha
-      qdrant-client
-      # tensorflow-text
-      pypdf
-      networkx
-      # nomic
-      # aleph-alpha-client
-      # deeplake
-      # libdeeplake
-      pgvector
-      psycopg2
-      pyowm
-      pytesseract
-      html2text
-      atlassian-python-api
-      gptcache
-      duckduckgo-search
-      # arxiv
-      azure-identity
-      # clickhouse-connect
-      azure-cosmos
-      # lancedb
-      # langkit
-      lark
-      pexpect
-      # pyvespa
-      # O365
-      jq
-      # docarray
-      pdfminer-six
-      lxml
-      requests-toolbelt
-      neo4j
-      # openlm
-      # azure-ai-formrecognizer
-      # azure-ai-vision
-      # azure-cognitiveservices-speech
-      # momento
-      # singlestoredb
-      # tigrisdb
-      # nebula3-python
-      # awadb
-      esprima
-      rdflib
-      # amadeus
-      librosa
-      python-arango
     ];
     cli = [
       typer
@@ -277,6 +174,9 @@ buildPythonPackage rec {
 
     # these tests have network access
     "test_socket_disabled"
+
+    # this test may require a specific version of langchain-community
+    "test_compatible_vectorstore_documentation"
   ];
 
   pythonImportsCheck = [
@@ -285,8 +185,8 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Building applications with LLMs through composability";
-    homepage = "https://github.com/hwchase17/langchain";
-    changelog = "https://github.com/hwchase17/langchain/releases/tag/v${version}";
+    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 ];
   };