Unverified Commit 274b5189 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #307684 from fabaff/langchain-bump

python312Packages.langchain-community: 0.0.33 -> 0.0.34, python312Packages.anthropic: 0.19.1 -> 0.25.6, python312Packages.langsmith: 0.1.48 -> 0.1.51, python312Packages.instructor: 0.6.8 -> 1.2.3
parents 3e49b0ba 8d2927a9
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
{ lib
, python3
, fetchPypi
, nix-update-script
{
  lib,
  fetchFromGitHub,
  python3,
}:

python3.pkgs.buildPythonApplication rec {
  pname = "shell_gpt";
  pname = "shell-gpt";
  version = "1.4.3";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-zSgWSC60ypOQ1IENcxObBezAfHosQWBD9ft06yh5iV4=";
  src = fetchFromGitHub {
    owner = "TheR1D";
    repo = "shell_gpt";
    rev = "refs/tags/${version}";
    hash = "sha256-T37L4U1kOrrIQJ2znq2UupD3pyit9xd8rAsEwUvGiQ8=";
  };

  nativeBuildInputs = with python3.pkgs; [
    python3.pkgs.pythonRelaxDepsHook
    python3
    pip
  pythonRelaxDeps = [
    "requests"
    "rich"
    "distro"
    "typer"
    "instructor"
  ];

  build-system = with python3.pkgs; [ hatchling ];

  nativeBuildInputs = with python3.pkgs; [ pythonRelaxDepsHook ];

  propagatedBuildInputs = with python3.pkgs; [
    markdown-it-py
    rich
    click
    distro
    typer
    requests
    hatchling
    openai
    instructor
    openai
    rich
    typer
  ];

  pythonRelaxDeps = [ "requests" "rich" "distro" "typer" ];

  passthru.updateScript = nix-update-script { };

  # Tests want to read the OpenAI API key from stdin
  doCheck = false;

  meta = with lib; {
    mainProgram = "sgpt";
    homepage = "https://github.com/TheR1D/shell_gpt";
    description = "Access ChatGPT from your terminal";
    platforms = platforms.unix;
    homepage = "https://github.com/TheR1D/shell_gpt";
    changelog = "https://github.com/TheR1D/shell_gpt/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ mglolenstine ];
    mainProgram = "sgpt";
  };
}
+35 −24
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, anyio
, distro
, dirty-equals
, httpx
, google-auth
, sniffio
, pydantic
, pytest-asyncio
, respx
, tokenizers
, typing-extensions
, pytestCheckHook
, pythonOlder
{
  lib,
  anyio,
  buildPythonPackage,
  dirty-equals,
  distro,
  fetchFromGitHub,
  google-auth,
  hatch-fancy-pypi-readme,
  hatchling,
  httpx,
  pydantic,
  pytest-asyncio,
  pytestCheckHook,
  pythonOlder,
  respx,
  sniffio,
  tokenizers,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "anthropic";
  version = "0.19.1";
  version = "0.25.6";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -28,14 +30,15 @@ buildPythonPackage rec {
    owner = "anthropics";
    repo = "anthropic-sdk-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-D9asbwZ9puOuIK6w7cWJ2HmC3JYjamUZPOxVKWq+Va4=";
    hash = "sha256-83TufOgu6W9UvoCEUgDiw6gXDAdwyIKEALVF0hjj6wk=";
  };

  nativeBuildInputs = [
  build-system = [
    hatchling
    hatch-fancy-pypi-readme
  ];

  propagatedBuildInputs = [
  dependencies = [
    anyio
    distro
    httpx
@@ -56,13 +59,21 @@ buildPythonPackage rec {
    respx
  ];

  pythonImportsCheck = [ "anthropic" ];

  disabledTests = [
    # Test require network access
    "test_copy_build_request"
  ];

  disabledTestPaths = [
    # require network access
    # Test require network access
    "tests/api_resources"
  ];

  pythonImportsCheck = [
    "anthropic"
  pytestFlagsArray = [
    "-W"
    "ignore::DeprecationWarning"
  ];

  meta = with lib; {
+60 −11
Original line number Diff line number Diff line
{ lib
, python3
, fetchPypi
, buildPythonPackage
{
  lib,
  aiohttp,
  anthropic,
  buildPythonPackage,
  docstring-parser,
  fetchFromGitHub,
  openai,
  poetry-core,
  pydantic,
  pytest-examples,
  pytest-asyncio,
  pytestCheckHook,
  fastapi,
  diskcache,
  redis,
  pythonOlder,
  pythonRelaxDepsHook,
  rich,
  tenacity,
  typer,
}:

buildPythonPackage rec {
  pname = "instructor";
  version = "0.6.8";
  version = "1.2.3";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-4mHXPes1NdYu53XEN7gq626cKy9ju1M7U6n6akfbuVo=";
  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "jxnl";
    repo = "instructor";
    rev = "refs/tags/${version}";
    hash = "sha256-LmorlFKIG7iPAK4pDbQqjxjiwB1md3u52B4u5WlqqTk=";
  };

  nativeBuildInputs = [
    python3.pkgs.poetry-core
  pythonRelaxDeps = [
    "docstring-parser"
    "pydantic"
  ];

  propagatedBuildInputs = with python3.pkgs; [
  build-system = [ poetry-core ];

  nativeBuildInputs = [ pythonRelaxDepsHook ];

  dependencies = [
    aiohttp
    docstring-parser
    openai
@@ -28,8 +54,31 @@ buildPythonPackage rec {
    typer
  ];

  nativeCheckInputs = [
    anthropic
    fastapi
    redis
    diskcache
    pytest-asyncio
    pytest-examples
    pytestCheckHook
  ];

  pythonImportsCheck = [ "instructor" ];

  disabledTests = [
    # Tests require OpenAI API key
    "test_partial"
    "successfully"
  ];

  disabledTestPaths = [
    # Tests require OpenAI API key
    "tests/test_distil.py"
    "tests/test_new_client.py"
    "tests/llm/"
  ];

  meta = with lib; {
    description = "Structured outputs for llm";
    homepage = "https://github.com/jxnl/instructor";
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

buildPythonPackage rec {
  pname = "langchain-community";
  version = "0.0.33";
  version = "0.0.34";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -26,7 +26,7 @@ buildPythonPackage rec {
  src = fetchPypi {
    pname = "langchain_community";
    inherit version;
    hash = "sha256-u1bbwe8RygnyWEaOETaHga3akhnhRAc+MM2mlJbTQrI=";
    hash = "sha256-lumoB9m0d3gg31qXCZb2vzrVYyE3vw9NhjvYMr3rKw8=";
  };

  build-system = [ poetry-core ];
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ buildPythonPackage rec {
    # AssertionErrors
    "test_callback_handlers"
    "test_generic_fake_chat_model"
    # Test is outdated
    "test_serializable_mapping"
  ];

  pythonImportsCheck = [ "langchain" ];
Loading