2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-06-05 15:53:02 +00:00
|
|
|
poetry-core,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
langchain-core,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
httpx,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langchain-text-splitters";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "langchain-ai";
|
|
|
|
repo = "langchain";
|
|
|
|
rev = "refs/tags/langchain-text-splitters==${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Z0UAUhOjC0wgCY/f1aWsnjFyOPYz/6JnloEKT6b6Ii0=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
sourceRoot = "${src.name}/libs/text-splitters";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
|
|
|
langchain-core
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "langchain_text_splitters" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
httpx
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/unit_tests" ];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit (langchain-core) updateScript;
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2024-07-27 06:49:29 +00:00
|
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-text-splitters==${version}";
|
|
|
|
description = "LangChain utilities for splitting into chunks a wide variety of text documents";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/text-splitters";
|
2024-06-20 14:57:18 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ fab ];
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
}
|