depot/third_party/nixpkgs/pkgs/development/python-modules/langfuse/default.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

62 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
anyio,
backoff,
httpx,
idna,
langchain,
llama-index,
openai,
packaging,
poetry-core,
pydantic,
wrapt,
}:
buildPythonPackage rec {
pname = "langfuse";
version = "2.51.5";
pyproject = true;
src = fetchFromGitHub {
owner = "langfuse";
repo = "langfuse-python";
rev = "refs/tags/v${version}";
hash = "sha256-2zcEpSXpW67ltB87LIqH6+DCKvNK1gstJU+/JHDJoPE=";
};
build-system = [ poetry-core ];
pythonRelaxDeps = [ "packaging" ];
dependencies = [
anyio
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/${lib.removePrefix "refs/tags/" src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}