472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
62 lines
1.2 KiB
Nix
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.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "langfuse";
|
|
repo = "langfuse-python";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-MaTR7hEE+Ed9pCXJ2JSxzLAJ0O0SnN3M3b5/7tdmQBw=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|