depot/third_party/nixpkgs/pkgs/development/python-modules/langfuse/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

61 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
backoff,
httpx,
idna,
langchain,
llama-index,
openai,
packaging,
poetry-core,
pydantic,
wrapt,
}:
buildPythonPackage rec {
pname = "langfuse";
version = "2.36.2";
pyproject = true;
src = fetchFromGitHub {
owner = "langfuse";
repo = "langfuse-python";
rev = "refs/tags/v${version}";
hash = "sha256-7snmEjRRciYaxUm0wUwQn5HKTvQOPVH5rXVUGZ+BXgk=";
};
build-system = [ poetry-core ];
pythonRelaxDeps = [ "packaging" ];
dependencies = [
backoff
httpx
idna
packaging
pydantic
wrapt
];
optional-dependencies = {
langchain = [ langchain ];
llama-index = [ llama-index ];
openai = [ openai ];
};
pythonImportsCheck = [ "langfuse" ];
# tests require network access and openai api key
doCheck = false;
meta = {
description = "Instrument your LLM app with decorators or low-level SDK and get detailed tracing/observability";
homepage = "https://github.com/langfuse/langfuse-python";
changelog = "https://github.com/langfuse/langfuse-python/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}