Unverified Commit f622331f authored by Florian RICHER's avatar Florian RICHER
Browse files

python3Packages.langchain-experimental: Init at 0.3.4

parent 29787267
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
diff --git a/tests/unit_tests/test_bash.py b/tests/unit_tests/test_bash.py
index ba7b0d0..cade19e 100644
--- a/tests/unit_tests/test_bash.py
+++ b/tests/unit_tests/test_bash.py
@@ -58,7 +58,7 @@ def test_incorrect_command_return_err_output() -> None:
     session = BashProcess(return_err_output=True)
     output = session.run(["invalid_command"])
     assert re.match(
-        r"^/bin/sh:.*invalid_command.*(?:not found|Permission denied).*$", output
+        r".*/bin/sh:.*invalid_command.*(?:not found|Permission denied).*$", output
     )
 
 
+76 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  poetry-core,

  # dependencies
  langchain-core,
  langchain-community,

  # testing
  langchain-tests,
  pytestCheckHook,

  # passthru
  gitUpdater,
}:

buildPythonPackage rec {
  pname = "langchain-experimental";
  version = "0.3.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain-experimental";
    tag = "libs/experimental/v${version}";
    hash = "sha256-KgGfJfxHOfpwVVo/OcbOjiO5pbxoDE1MiyKqUwsqfIg=";
  };

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

  patches = [
    # Remove it when https://github.com/langchain-ai/langchain-experimental/pull/58 is merged and released
    ./001-avoid-check-fullpath.patch
  ];

  build-system = [
    poetry-core
  ];

  pythonRelaxDeps = [
    # Each component release requests the exact latest core.
    # That prevents us from updating individual components.
    "langchain-core"
    "langchain-community"
  ];

  dependencies = [
    langchain-core
    langchain-community
  ];

  nativeCheckInputs = [
    langchain-tests
    pytestCheckHook
  ];

  pytestFlagsArray = [ "tests/unit_tests" ];

  pythonImportsCheck = [ "langchain_experimental" ];

  passthru.updateScript = gitUpdater {
    rev-prefix = "libs/experimental/v";
  };

  meta = {
    changelog = "https://github.com/langchain-ai/langchain-experimental/releases/tag/${src.tag}";
    description = "Package add experimental features on LangChain";
    homepage = "https://github.com/langchain-ai/langchain-experimental/tree/main/libs/experimental";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ mrdev023 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -7717,6 +7717,8 @@ self: super: with self; {
  langchain-deepseek = callPackage ../development/python-modules/langchain-deepseek { };
  langchain-experimental = callPackage ../development/python-modules/langchain-experimental { };
  langchain-fireworks = callPackage ../development/python-modules/langchain-fireworks { };
  langchain-groq = callPackage ../development/python-modules/langchain-groq { };