Merge pull request #317142 from natsukium/langfuse/init

python311Packages.langfuse: init at 2.33.1

authored by

OTABI Tomoya and committed by
GitHub
4f4846ed f5bcf482

+65
+63
pkgs/development/python-modules/langfuse/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + backoff, 6 + httpx, 7 + idna, 8 + langchain, 9 + llama-index, 10 + openai, 11 + packaging, 12 + poetry-core, 13 + pydantic, 14 + pythonRelaxDepsHook, 15 + wrapt, 16 + }: 17 + 18 + buildPythonPackage rec { 19 + pname = "langfuse"; 20 + version = "2.33.1"; 21 + pyproject = true; 22 + 23 + src = fetchFromGitHub { 24 + owner = "langfuse"; 25 + repo = "langfuse-python"; 26 + rev = "refs/tags/v${version}"; 27 + hash = "sha256-ZPCL3Xle4qEw2pNIcja252meep26W/RbVEk2suzywYI="; 28 + }; 29 + 30 + build-system = [ poetry-core ]; 31 + 32 + nativeBuildInputs = [ pythonRelaxDepsHook ]; 33 + 34 + pythonRelaxDeps = [ "packaging" ]; 35 + 36 + dependencies = [ 37 + backoff 38 + httpx 39 + idna 40 + packaging 41 + pydantic 42 + wrapt 43 + ]; 44 + 45 + optional-dependencies = { 46 + langchain = [ langchain ]; 47 + llama-index = [ llama-index ]; 48 + openai = [ openai ]; 49 + }; 50 + 51 + pythonImportsCheck = [ "langfuse" ]; 52 + 53 + # tests require network access and openai api key 54 + doCheck = false; 55 + 56 + meta = { 57 + description = "Instrument your LLM app with decorators or low-level SDK and get detailed tracing/observability"; 58 + homepage = "https://github.com/langfuse/langfuse-python"; 59 + changelog = "https://github.com/langfuse/langfuse-python/releases/tag/${src.rev}"; 60 + license = lib.licenses.mit; 61 + maintainers = with lib.maintainers; [ natsukium ]; 62 + }; 63 + }
+2
pkgs/top-level/python-packages.nix
··· 6503 6503 6504 6504 langdetect = callPackage ../development/python-modules/langdetect { }; 6505 6505 6506 + langfuse = callPackage ../development/python-modules/langfuse { }; 6507 + 6506 6508 langid = callPackage ../development/python-modules/langid { }; 6507 6509 6508 6510 langsmith = callPackage ../development/python-modules/langsmith { };