Unverified Commit 75f81c93 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #328207 from drupol/bump/langchain-various

python3Packages.langchain-openai: init at 0.1.17
parents 4269caed be1552f6
Loading
Loading
Loading
Loading
+76 −0
Original line number Diff line number Diff line
{
  lib,
  azure-identity,
  buildPythonPackage,
  fetchFromGitHub,
  freezegun,
  langchain-core,
  langchain-openai,
  lark,
  pandas,
  poetry-core,
  pytest-asyncio,
  pytest-mock,
  pytest-socket,
  pytestCheckHook,
  pythonOlder,
  requests-mock,
  responses,
  syrupy,
  toml,
}:

buildPythonPackage rec {
  pname = "langchain-azure-dynamic-sessions";
  version = "0.1.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain";
    rev = "refs/tags/langchain-azure-dynamic-sessions==${version}";
    hash = "sha256-jz4IBMnWuk8FsSsyfLN14B0xWZrmZrvEW95a45S+FOo=";
  };

  sourceRoot = "${src.name}/libs/partners/azure-dynamic-sessions";

  build-system = [ poetry-core ];

  dependencies = [
    azure-identity
    langchain-core
    langchain-openai
  ];

  nativeCheckInputs = [
    freezegun
    lark
    pandas
    pytest-asyncio
    pytest-mock
    pytest-socket
    pytestCheckHook
    requests-mock
    responses
    syrupy
    toml
  ];

  pytestFlagsArray = [ "tests/unit_tests" ];

  pythonImportsCheck = [ "langchain_azure_dynamic_sessions" ];

  passthru = {
    updateScript = langchain-core.updateScript;
  };

  meta = {
    description = "Integration package connecting Azure Container Apps dynamic sessions and LangChain";
    homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/azure-dynamic-sessions";
    changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-azure-dynamic-sessions==${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
}
+6 −5
Original line number Diff line number Diff line
@@ -12,14 +12,14 @@

buildPythonPackage rec {
  pname = "langchain-chroma";
  version = "0.2.9";
  version = "0.1.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain";
    rev = "refs/tags/langchain-core==${version}";
    hash = "sha256-/BUn/NxaE9l3VY6dPshr1JJaHTGzn9NMQhSQ2De65Jg=";
    rev = "refs/tags/langchain-chroma==${version}";
    hash = "sha256-PQ3bepiAqzWhQdKofQSzQKxRrwI6dxBfSNV91462aJE=";
  };

  sourceRoot = "${src.name}/libs/partners/chroma";
@@ -44,8 +44,9 @@ buildPythonPackage rec {
  };

  meta = {
    description = "Build context-aware reasoning applications";
    homepage = "https://github.com/langchain-ai/langchain";
    changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-chroma==${version}";
    description = "Integration package connecting Chroma and LangChain";
    homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/chroma";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
+14 −5
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
  langchain,
  langchain-core,
  langsmith,
  httpx,
  lark,
  numpy,
  pandas,
@@ -28,7 +29,7 @@

buildPythonPackage rec {
  pname = "langchain-community";
  version = "0.2.9";
  version = "0.2.7";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -36,12 +37,19 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain";
    rev = "refs/tags/langchain-core==${version}";
    hash = "sha256-/BUn/NxaE9l3VY6dPshr1JJaHTGzn9NMQhSQ2De65Jg=";
    rev = "refs/tags/langchain-community==${version}";
    hash = "sha256-r0YSJkYPcwjHyw1xST5Zrgg9USjN9GOsvhV97imSFCQ=";
  };

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

  preConfigure = ''
    ln -s ${src}/libs/standard-tests/langchain_standard_tests ./langchain_standard_tests

    substituteInPlace pyproject.toml \
      --replace-fail "path = \"../standard-tests\"" "path = \"./langchain_standard_tests\""
  '';

  build-system = [ poetry-core ];

  dependencies = [
@@ -57,13 +65,14 @@ buildPythonPackage rec {
    tenacity
  ];

  passthru.optional-dependencies = {
  optional-dependencies = {
    cli = [ typer ];
  };

  pythonImportsCheck = [ "langchain_community" ];

  nativeCheckInputs = [
    httpx
    lark
    pandas
    pytest-asyncio
@@ -93,9 +102,9 @@ buildPythonPackage rec {
  ];

  meta = {
    changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-community==${version}";
    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 = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
+17 −14
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  freezegun,
  grandalf,
  httpx,
  jsonpatch,
  langsmith,
  numpy,
@@ -23,7 +25,7 @@

buildPythonPackage rec {
  pname = "langchain-core";
  version = "0.2.9";
  version = "0.2.21";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -32,18 +34,19 @@ buildPythonPackage rec {
    owner = "langchain-ai";
    repo = "langchain";
    rev = "refs/tags/langchain-core==${version}";
    hash = "sha256-/BUn/NxaE9l3VY6dPshr1JJaHTGzn9NMQhSQ2De65Jg=";
    hash = "sha256-8qEN03iimGLnhg6TdpPal+MXBZJ/QHJKwjxRF96abBw=";
  };

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

  pythonRelaxDeps = [
    "langsmith"
    "packaging"
  ];
  preConfigure = ''
    ln -s ${src}/libs/standard-tests/langchain_standard_tests ./langchain_standard_tests

  build-system = [ poetry-core ];
    substituteInPlace pyproject.toml \
      --replace-fail "path = \"../standard-tests\"" "path = \"./langchain_standard_tests\""
  '';

  build-system = [ poetry-core ];

  dependencies = [
    jsonpatch
@@ -59,6 +62,7 @@ buildPythonPackage rec {
  nativeCheckInputs = [
    freezegun
    grandalf
    httpx
    numpy
    pytest-asyncio
    pytest-mock
@@ -69,13 +73,6 @@ buildPythonPackage rec {

  pytestFlagsArray = [ "tests/unit_tests" ];

  disabledTests = [
    # Fail for an unclear reason with:
    # AssertionError: assert '6a92363c-4ac...-d344769ab6ac' == '09af124a-2ed...-671c64c72b70'
    "test_config_traceable_handoff"
    "test_config_traceable_async_handoff"
  ];

  passthru = {
    updateScript = writeScript "update.sh" ''
      #!/usr/bin/env nix-shell
@@ -89,6 +86,12 @@ buildPythonPackage rec {
    '';
  };

  disabledTests = lib.optionals stdenv.isDarwin [
    # Langchain-core the following tests due to the test comparing execution time with magic values.
    "test_queue_for_streaming_via_sync_call"
    "test_same_event_loop"
  ];

  meta = {
    description = "Building applications with LLMs through composability";
    homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/core";
+80 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  freezegun,
  huggingface-hub,
  langchain-core,
  sentence-transformers,
  tokenizers,
  transformers,
  lark,
  pandas,
  poetry-core,
  pytest-asyncio,
  pytest-mock,
  pytest-socket,
  pytestCheckHook,
  pythonOlder,
  requests-mock,
  responses,
  syrupy,
  toml,
}:

buildPythonPackage rec {
  pname = "langchain-huggingface";
  version = "0.0.3";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain";
    rev = "refs/tags/langchain-huggingface==${version}";
    hash = "sha256-4k3C6T2N7SBM/wP8KAwMQqt9DkXDdYNt2i/OkZilWw0=";
  };

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

  build-system = [ poetry-core ];

  dependencies = [
    huggingface-hub
    langchain-core
    sentence-transformers
    tokenizers
    transformers
  ];

  nativeCheckInputs = [
    freezegun
    lark
    pandas
    pytest-asyncio
    pytest-mock
    pytest-socket
    pytestCheckHook
    requests-mock
    responses
    syrupy
    toml
  ];

  pytestFlagsArray = [ "tests/unit_tests" ];

  pythonImportsCheck = [ "langchain_huggingface" ];

  passthru = {
    updateScript = langchain-core.updateScript;
  };

  meta = {
    changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-huggingface==${version}";
    description = "An integration package connecting Huggingface related classes and LangChain";
    homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/huggingface";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
}
Loading