depot/third_party/nixpkgs/pkgs/development/python-modules/langchain-community/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

100 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pythonOlder,
aiohttp,
dataclasses-json,
duckdb-engine,
langchain,
langchain-core,
langsmith,
lark,
numpy,
pandas,
pytest-asyncio,
pytest-mock,
pytestCheckHook,
pyyaml,
requests,
requests-mock,
responses,
sqlalchemy,
syrupy,
tenacity,
toml,
typer,
}:
buildPythonPackage rec {
pname = "langchain-community";
version = "0.2.5";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/${pname}==${version}";
hash = "sha256-SVqhNfRAQoVyUsPw55ByPtVzU/h1II/ox8I79QJsci8=";
};
sourceRoot = "${src.name}/libs/community";
build-system = [ poetry-core ];
dependencies = [
aiohttp
dataclasses-json
langchain-core
langchain
langsmith
numpy
pyyaml
requests
sqlalchemy
tenacity
];
passthru.optional-dependencies = {
cli = [ typer ];
};
pythonImportsCheck = [ "langchain_community" ];
nativeCheckInputs = [
duckdb-engine
lark
pandas
pytest-asyncio
pytest-mock
pytestCheckHook
requests-mock
responses
syrupy
toml
];
pytestFlagsArray = [ "tests/unit_tests" ];
passthru = {
updateScript = langchain-core.updateScript;
};
__darwinAllowLocalNetworking = true;
disabledTests = [
# Test require network access
"test_ovhcloud_embed_documents"
];
meta = {
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 ];
};
}