2024-04-04 23:16:31 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-05-24 01:33:13 +00:00
|
|
|
fetchFromGitHub,
|
2025-03-15 11:04:06 -07:00
|
|
|
nix-update-script,
|
2024-09-06 12:14:06 +02:00
|
|
|
|
|
|
|
# build-system
|
2025-02-15 02:01:00 +00:00
|
|
|
pdm-backend,
|
2024-09-06 12:14:06 +02:00
|
|
|
|
|
|
|
# dependencies
|
2024-04-04 23:16:31 +02:00
|
|
|
aiohttp,
|
|
|
|
dataclasses-json,
|
2025-01-22 03:42:18 +00:00
|
|
|
httpx-sse,
|
2024-09-06 12:14:06 +02:00
|
|
|
langchain,
|
2025-01-22 03:42:18 +00:00
|
|
|
langchain-core,
|
2024-04-04 23:16:31 +02:00
|
|
|
langsmith,
|
2025-02-15 02:01:00 +00:00
|
|
|
numpy,
|
2024-09-15 00:12:02 +02:00
|
|
|
pydantic-settings,
|
2024-09-06 12:14:06 +02:00
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
sqlalchemy,
|
|
|
|
tenacity,
|
|
|
|
|
|
|
|
# tests
|
2025-04-28 12:01:32 -07:00
|
|
|
blockbuster,
|
2025-05-17 15:44:21 -07:00
|
|
|
duckdb,
|
|
|
|
duckdb-engine,
|
2024-07-18 19:11:31 +02:00
|
|
|
httpx,
|
2025-01-22 19:42:31 +09:00
|
|
|
langchain-tests,
|
2024-05-24 01:33:13 +00:00
|
|
|
lark,
|
|
|
|
pandas,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
requests-mock,
|
|
|
|
responses,
|
|
|
|
syrupy,
|
|
|
|
toml,
|
2024-01-14 16:37:10 +09:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langchain-community";
|
2025-05-17 15:44:21 -07:00
|
|
|
version = "0.3.24";
|
2024-01-14 16:37:10 +09:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-05-24 01:33:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "langchain-ai";
|
2025-05-17 15:44:21 -07:00
|
|
|
repo = "langchain-community";
|
|
|
|
tag = "libs/community/v${version}";
|
|
|
|
hash = "sha256-4Rcczuz7tCb10HPvO15n48DBKjVBLXNPdRfD4lRKNGk=";
|
2024-01-14 16:37:10 +09:00
|
|
|
};
|
|
|
|
|
2024-05-24 01:33:13 +00:00
|
|
|
sourceRoot = "${src.name}/libs/community";
|
|
|
|
|
2025-02-15 02:01:00 +00:00
|
|
|
build-system = [ pdm-backend ];
|
2024-01-14 16:37:10 +09:00
|
|
|
|
2024-10-28 16:48:14 +01:00
|
|
|
pythonRelaxDeps = [
|
2025-03-18 14:21:33 -07:00
|
|
|
# Each component release requests the exact latest langchain and -core.
|
2025-06-02 15:54:57 +02:00
|
|
|
# That prevents us from updating individual components.
|
2025-03-18 14:21:33 -07:00
|
|
|
"langchain"
|
|
|
|
"langchain-core"
|
2024-12-24 19:13:08 +01:00
|
|
|
"numpy"
|
2024-10-28 16:48:14 +01:00
|
|
|
"pydantic-settings"
|
|
|
|
"tenacity"
|
|
|
|
];
|
2024-09-15 00:12:02 +02:00
|
|
|
|
2025-05-17 15:44:21 -07:00
|
|
|
pythonRemoveDeps = [
|
|
|
|
"bs4"
|
|
|
|
];
|
|
|
|
|
2024-04-04 23:17:28 +02:00
|
|
|
dependencies = [
|
2024-01-14 16:37:10 +09:00
|
|
|
aiohttp
|
|
|
|
dataclasses-json
|
2025-01-22 03:42:18 +00:00
|
|
|
httpx-sse
|
2024-05-24 01:33:13 +00:00
|
|
|
langchain
|
2025-01-22 03:42:18 +00:00
|
|
|
langchain-core
|
2024-01-14 16:37:10 +09:00
|
|
|
langsmith
|
2025-02-15 02:01:00 +00:00
|
|
|
numpy
|
2024-09-15 00:12:02 +02:00
|
|
|
pydantic-settings
|
2024-01-14 16:37:10 +09:00
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
sqlalchemy
|
|
|
|
tenacity
|
|
|
|
];
|
2025-05-17 15:44:21 -07:00
|
|
|
|
2024-01-14 16:37:10 +09:00
|
|
|
pythonImportsCheck = [ "langchain_community" ];
|
|
|
|
|
2024-05-24 01:33:13 +00:00
|
|
|
nativeCheckInputs = [
|
2025-04-28 12:01:32 -07:00
|
|
|
blockbuster
|
2025-05-17 15:44:21 -07:00
|
|
|
duckdb
|
|
|
|
duckdb-engine
|
2024-07-18 19:11:31 +02:00
|
|
|
httpx
|
2025-01-22 19:42:31 +09:00
|
|
|
langchain-tests
|
2024-05-24 01:33:13 +00:00
|
|
|
lark
|
|
|
|
pandas
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
responses
|
|
|
|
syrupy
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
2025-05-17 15:44:21 -07:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit_tests"
|
|
|
|
];
|
2024-01-14 16:37:10 +09:00
|
|
|
|
2024-06-10 14:57:13 +02:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2024-06-15 09:15:34 +02:00
|
|
|
disabledTests = [
|
2025-05-17 15:44:21 -07:00
|
|
|
# requires bs4, aka BeautifulSoup
|
|
|
|
"test_importable_all"
|
2025-05-19 11:56:24 -07:00
|
|
|
# flaky
|
2025-05-25 08:50:33 -07:00
|
|
|
"test_llm_caching"
|
2025-05-19 11:56:24 -07:00
|
|
|
"test_llm_caching_async"
|
2024-06-15 09:15:34 +02:00
|
|
|
];
|
|
|
|
|
2025-03-30 20:25:38 +00:00
|
|
|
disabledTestPaths = [
|
2025-04-28 12:01:32 -07:00
|
|
|
# depends on Pydantic v1 notations, will not load
|
|
|
|
"tests/unit_tests/document_loaders/test_gitbook.py"
|
2025-03-30 20:25:38 +00:00
|
|
|
];
|
|
|
|
|
2025-03-15 11:04:06 -07:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
extraArgs = [
|
|
|
|
"--version-regex"
|
2025-05-17 15:44:21 -07:00
|
|
|
"libs/community/v([0-9.]+)"
|
2025-03-15 11:04:06 -07:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-10 14:57:13 +02:00
|
|
|
meta = {
|
2024-01-14 16:37:10 +09:00
|
|
|
description = "Community contributed LangChain integrations";
|
2025-05-17 15:44:21 -07:00
|
|
|
homepage = "https://github.com/langchain-ai/langchain-community";
|
|
|
|
changelog = "https://github.com/langchain-ai/langchain-community/releases/tag/libs%2Fcommunity%2fv${version}";
|
2024-06-10 14:57:13 +02:00
|
|
|
license = lib.licenses.mit;
|
2025-02-06 10:55:24 -08:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
natsukium
|
|
|
|
sarahec
|
|
|
|
];
|
2024-01-14 16:37:10 +09:00
|
|
|
};
|
|
|
|
}
|