2024-04-04 23:16:31 +02:00
{
lib ,
buildPythonPackage ,
2024-05-24 01:33:13 +00:00
fetchFromGitHub ,
2024-09-06 12:14:06 +02:00
# build-system
2024-04-04 23:16:31 +02:00
poetry-core ,
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 ,
2024-09-15 00:12:02 +02:00
pydantic-settings ,
2024-09-06 12:14:06 +02:00
pyyaml ,
requests ,
sqlalchemy ,
tenacity ,
# optional-dependencies
typer ,
numpy ,
# tests
2024-07-18 19:11:31 +02:00
httpx ,
2024-09-06 12:14:06 +02:00
langchain-standard-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 = " l a n g c h a i n - c o m m u n i t y " ;
2025-01-22 03:42:18 +00:00
version = " 0 . 3 . 1 5 " ;
2024-01-14 16:37:10 +09:00
pyproject = true ;
2024-05-24 01:33:13 +00:00
src = fetchFromGitHub {
owner = " l a n g c h a i n - a i " ;
repo = " l a n g c h a i n " ;
2025-01-22 03:42:18 +00:00
tag = " l a n g c h a i n - c o m m u n i t y = = ${ version } " ;
hash = " s h a 2 5 6 - 2 / Z r l / w E D / z m 1 m + N q g A D 4 A d r E h / L j F O e Q o O S S M 0 5 e + s = " ;
2024-01-14 16:37:10 +09:00
} ;
2024-05-24 01:33:13 +00:00
sourceRoot = " ${ src . name } / l i b s / c o m m u n i t y " ;
2024-04-04 23:17:28 +02:00
build-system = [ poetry-core ] ;
2024-01-14 16:37:10 +09:00
2024-10-28 16:48:14 +01:00
pythonRelaxDeps = [
2024-12-24 19:13:08 +01:00
" n u m p y "
2024-10-28 16:48:14 +01:00
" p y d a n t i c - s e t t i n g s "
" t e n a c i t y "
] ;
2024-09-15 00:12:02 +02:00
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
2024-09-15 00:12:02 +02:00
pydantic-settings
2024-01-14 16:37:10 +09:00
pyyaml
requests
sqlalchemy
tenacity
] ;
2024-07-18 19:11:31 +02:00
optional-dependencies = {
2024-04-04 23:16:31 +02:00
cli = [ typer ] ;
2024-08-14 20:27:41 +00:00
numpy = [ numpy ] ;
2024-01-14 16:37:10 +09:00
} ;
pythonImportsCheck = [ " l a n g c h a i n _ c o m m u n i t y " ] ;
2024-05-24 01:33:13 +00:00
nativeCheckInputs = [
2024-07-18 19:11:31 +02:00
httpx
2024-08-21 10:09:03 +09:00
langchain-standard-tests
2024-05-24 01:33:13 +00:00
lark
pandas
pytest-asyncio
pytest-mock
pytestCheckHook
requests-mock
responses
syrupy
toml
] ;
pytestFlagsArray = [ " t e s t s / u n i t _ t e s t s " ] ;
2024-01-14 16:37:10 +09:00
2024-05-24 10:29:56 +09:00
passthru = {
2024-09-15 10:35:02 -07:00
inherit ( langchain-core ) updateScript ;
2024-05-24 10:29:56 +09:00
} ;
2024-06-10 14:57:13 +02:00
__darwinAllowLocalNetworking = true ;
2024-06-15 09:15:34 +02:00
disabledTests = [
# Test require network access
" t e s t _ o v h c l o u d _ e m b e d _ d o c u m e n t s "
2024-09-01 04:16:48 +00:00
" t e s t _ y a n d e x "
2024-07-12 10:53:02 +02:00
# duckdb-engine needs python-wasmer which is not yet available in Python 3.12
# See https://github.com/NixOS/nixpkgs/pull/326337 and https://github.com/wasmerio/wasmer-python/issues/778
" t e s t _ t a b l e _ i n f o "
" t e s t _ s q l _ d a t a b a s e _ r u n "
2024-12-24 19:13:08 +01:00
# pydantic.errors.PydanticUserError: `SQLDatabaseToolkit` is not fully defined; you should define `BaseCache`, then call `SQLDatabaseToolkit.model_rebuild()`.
" t e s t _ c r e a t e _ s q l _ a g e n t "
# pydantic.errors.PydanticUserError: `NatBotChain` is not fully defined; you should define `BaseCache`, then call `NatBotChain.model_rebuild()`.
" t e s t _ p r o p e r _ i n p u t s "
# pydantic.errors.PydanticUserError: `NatBotChain` is not fully defined; you should define `BaseCache`, then call `NatBotChain.model_rebuild()`.
" t e s t _ v a r i a b l e _ k e y _ n a m i n g "
2024-06-15 09:15:34 +02:00
] ;
2024-06-10 14:57:13 +02:00
meta = {
2024-07-18 19:11:31 +02:00
changelog = " h t t p s : / / g i t h u b . c o m / l a n g c h a i n - a i / l a n g c h a i n / r e l e a s e s / t a g / l a n g c h a i n - c o m m u n i t y = = ${ version } " ;
2024-01-14 16:37:10 +09:00
description = " C o m m u n i t y c o n t r i b u t e d L a n g C h a i n i n t e g r a t i o n s " ;
homepage = " h t t p s : / / g i t h u b . c o m / l a n g c h a i n - a i / l a n g c h a i n / t r e e / m a s t e r / l i b s / c o m m u n i t y " ;
2024-06-10 14:57:13 +02:00
license = lib . licenses . mit ;
maintainers = with lib . maintainers ; [ natsukium ] ;
2024-01-14 16:37:10 +09:00
} ;
}