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
This commit is contained in:
commit
274b5189a0
8 changed files with 157 additions and 89 deletions
51
pkgs/by-name/sh/shell-gpt/package.nix
Normal file
51
pkgs/by-name/sh/shell-gpt/package.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "shell-gpt";
|
||||
version = "1.4.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TheR1D";
|
||||
repo = "shell_gpt";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-T37L4U1kOrrIQJ2znq2UupD3pyit9xd8rAsEwUvGiQ8=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"requests"
|
||||
"rich"
|
||||
"distro"
|
||||
"typer"
|
||||
"instructor"
|
||||
];
|
||||
|
||||
build-system = with python3.pkgs; [ hatchling ];
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [ pythonRelaxDepsHook ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
click
|
||||
distro
|
||||
instructor
|
||||
openai
|
||||
rich
|
||||
typer
|
||||
];
|
||||
|
||||
# Tests want to read the OpenAI API key from stdin
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Access ChatGPT from your terminal";
|
||||
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";
|
||||
};
|
||||
}
|
|
@ -1,25 +1,27 @@
|
|||
{ 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; {
|
||||
|
|
|
@ -1,24 +1,50 @@
|
|||
{ 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";
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -158,6 +158,8 @@ buildPythonPackage rec {
|
|||
# AssertionErrors
|
||||
"test_callback_handlers"
|
||||
"test_generic_fake_chat_model"
|
||||
# Test is outdated
|
||||
"test_serializable_mapping"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "langchain" ];
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
anthropic,
|
||||
attr,
|
||||
buildPythonPackage,
|
||||
fastapi,
|
||||
fetchFromGitHub,
|
||||
freezegun,
|
||||
httpx,
|
||||
instructor,
|
||||
orjson,
|
||||
poetry-core,
|
||||
pydantic,
|
||||
|
@ -20,7 +22,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "langsmith";
|
||||
version = "0.1.48";
|
||||
version = "0.1.51";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
@ -29,7 +31,7 @@ buildPythonPackage rec {
|
|||
owner = "langchain-ai";
|
||||
repo = "langsmith-sdk";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-n24rlulncJHNyHFqszEbALGfnT7+tTGjLjwR7Fw1smI=";
|
||||
hash = "sha256-31DC5SqI2V7d3iC5LlZgU5xB0Lh6GrBFFF3A+HEbUKg=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/python";
|
||||
|
@ -48,9 +50,11 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
anthropic
|
||||
fastapi
|
||||
freezegun
|
||||
httpx
|
||||
instructor
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
uvicorn
|
||||
|
@ -81,6 +85,7 @@ buildPythonPackage rec {
|
|||
"tests/unit_tests/test_client.py"
|
||||
# Tests require a Langsmith API key
|
||||
"tests/evaluation/test_evaluation.py"
|
||||
"tests/external/test_instructor_evals.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "langsmith" ];
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
{ lib
|
||||
, python3
|
||||
, fetchPypi
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "shell_gpt";
|
||||
version = "1.4.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-zSgWSC60ypOQ1IENcxObBezAfHosQWBD9ft06yh5iV4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
python3.pkgs.pythonRelaxDepsHook
|
||||
python3
|
||||
pip
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
markdown-it-py
|
||||
rich
|
||||
distro
|
||||
typer
|
||||
requests
|
||||
hatchling
|
||||
openai
|
||||
instructor
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [ "requests" "rich" "distro" "typer" ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
mainProgram = "sgpt";
|
||||
homepage = "https://github.com/TheR1D/shell_gpt";
|
||||
description = "Access ChatGPT from your terminal";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mglolenstine ];
|
||||
};
|
||||
}
|
|
@ -34417,8 +34417,6 @@ with pkgs;
|
|||
|
||||
shavee = callPackage ../applications/misc/shavee { };
|
||||
|
||||
shell_gpt = callPackage ../tools/llm/shell_gpt { };
|
||||
|
||||
shfmt = callPackage ../tools/text/shfmt { };
|
||||
|
||||
shipments = callPackage ../applications/misc/shipments { };
|
||||
|
|
Loading…
Reference in a new issue