1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 pdm-backend, 8 9 # dependencies 10 aiohttp, 11 fireworks-ai, 12 langchain-core, 13 openai, 14 pydantic, 15 16 # tests 17 langchain-tests, 18 pytest-asyncio, 19 pytestCheckHook, 20 21 # passthru 22 gitUpdater, 23}: 24 25buildPythonPackage rec { 26 pname = "langchain-fireworks"; 27 version = "0.3.0"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "langchain-ai"; 32 repo = "langchain"; 33 tag = "langchain-fireworks==${version}"; 34 hash = "sha256-OZou323FAk2I4YuQV7sllbzDwFQWy/90FK3gIHnEBd0="; 35 }; 36 37 sourceRoot = "${src.name}/libs/partners/fireworks"; 38 39 build-system = [ pdm-backend ]; 40 41 dependencies = [ 42 aiohttp 43 fireworks-ai 44 langchain-core 45 openai 46 pydantic 47 ]; 48 49 pythonRelaxDeps = [ 50 # Each component release requests the exact latest core. 51 # That prevents us from updating individual components. 52 "langchain-core" 53 ]; 54 55 nativeCheckInputs = [ 56 langchain-tests 57 pytest-asyncio 58 pytestCheckHook 59 ]; 60 61 enabledTestPaths = [ "tests/unit_tests" ]; 62 63 pythonImportsCheck = [ "langchain_fireworks" ]; 64 65 passthru = { 66 # python updater script sets the wrong tag 67 skipBulkUpdate = true; 68 updateScript = gitUpdater { 69 rev-prefix = "langchain-fireworks=="; 70 }; 71 }; 72 73 meta = { 74 changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.tag}"; 75 description = "Build LangChain applications with Fireworks"; 76 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/fireworks"; 77 license = lib.licenses.mit; 78 maintainers = [ 79 lib.maintainers.sarahec 80 ]; 81 }; 82}