depot/third_party/nixpkgs/pkgs/development/python-modules/langchain-ollama/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

68 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
langchain-core,
ollama,
# testing
langchain-standard-tests,
pytestCheckHook,
pytest-asyncio,
syrupy,
nix-update-script,
}:
buildPythonPackage rec {
pname = "langchain-ollama";
version = "0.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
rev = "refs/tags/langchain-ollama==${version}";
hash = "sha256-NtlJqIevdaoOO4oDqKsL4OFbw8tHb3FjV9LrTytOGKE=";
};
sourceRoot = "${src.name}/libs/partners/ollama";
build-system = [ poetry-core ];
dependencies = [
langchain-core
ollama
];
nativeCheckInputs = [
langchain-standard-tests
pytestCheckHook
pytest-asyncio
syrupy
];
pytestFlagsArray = [ "tests/unit_tests" ];
pythonImportsCheck = [ "langchain_ollama" ];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"langchain-ollama==(.*)"
];
};
meta = {
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-ollama==${version}";
description = "Integration package connecting Ollama and LangChain";
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/ollama";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sarahec ];
};
}