2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
poetry-core,
|
|
|
|
|
|
|
|
# dependencies
|
2024-07-27 06:49:29 +00:00
|
|
|
langchain-core,
|
2024-09-19 14:19:46 +00:00
|
|
|
numpy,
|
2024-07-27 06:49:29 +00:00
|
|
|
pymongo,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
freezegun,
|
|
|
|
httpx,
|
|
|
|
langchain,
|
2024-07-27 06:49:29 +00:00
|
|
|
pytest-asyncio,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestCheckHook,
|
2024-07-27 06:49:29 +00:00
|
|
|
pytest-mock,
|
|
|
|
syrupy,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langchain-mongodb";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.2.0";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "langchain-ai";
|
|
|
|
repo = "langchain";
|
|
|
|
rev = "refs/tags/langchain-mongodb==${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Jd9toXkS9dGtSIrJQ/5W+swV1z2BJOJKBtkyGzj3oSc=";
|
2024-07-27 06:49:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "${src.name}/libs/partners/mongodb";
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
langchain-core
|
2024-09-19 14:19:46 +00:00
|
|
|
numpy
|
2024-07-27 06:49:29 +00:00
|
|
|
pymongo
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
freezegun
|
2024-09-19 14:19:46 +00:00
|
|
|
httpx
|
2024-07-27 06:49:29 +00:00
|
|
|
langchain
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-mock
|
2024-07-27 06:49:29 +00:00
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit_tests" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "langchain_mongodb" ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
passthru = {
|
|
|
|
inherit (langchain-core) updateScript;
|
2024-07-27 06:49:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-mongodb==${version}";
|
|
|
|
description = "Integration package connecting MongoDB and LangChain";
|
|
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mongodb";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|