1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{
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 ];
};
}
|