diff options
author | OTABI Tomoya <tomoya.otabi@gmail.com> | 2024-06-07 15:32:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 15:32:37 +0900 |
commit | 4f4846ed59f5c171ffdc6e17cb690e0010d0d12e (patch) | |
tree | ef086f26b935911d8c7976f2baa8bdd2c79e2968 /pkgs/development | |
parent | f5bcf482b423959f73d5340a3add10285015fa2e (diff) | |
parent | e823f8a4b1b7162d3d6da285e35ddf75b3179069 (diff) |
Merge pull request #317142 from natsukium/langfuse/init
python311Packages.langfuse: init at 2.33.1
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/langfuse/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/langfuse/default.nix b/pkgs/development/python-modules/langfuse/default.nix new file mode 100644 index 0000000000000..ba8cb7db308f6 --- /dev/null +++ b/pkgs/development/python-modules/langfuse/default.nix @@ -0,0 +1,63 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + backoff, + httpx, + idna, + langchain, + llama-index, + openai, + packaging, + poetry-core, + pydantic, + pythonRelaxDepsHook, + wrapt, +}: + +buildPythonPackage rec { + pname = "langfuse"; + version = "2.33.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "langfuse"; + repo = "langfuse-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-ZPCL3Xle4qEw2pNIcja252meep26W/RbVEk2suzywYI="; + }; + + build-system = [ poetry-core ]; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + 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 ]; + }; +} |