Unverified Commit dc6b5876 authored by R. RyanTM's avatar R. RyanTM Committed by natsukium
Browse files

python3Packages.langfuse: 3.12.0 -> 4.0.1

parent 4def26f6
Loading
Loading
Loading
Loading
+2 −23
Original line number Diff line number Diff line
@@ -2,63 +2,42 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonAtLeast,
  anyio,
  backoff,
  httpx,
  idna,
  langchain,
  llama-index,
  openai,
  opentelemetry-api,
  opentelemetry-sdk,
  opentelemetry-exporter-otlp,
  packaging,
  poetry-core,
  pydantic,
  requests,
  wrapt,
}:

buildPythonPackage (finalAttrs: {
  pname = "langfuse";
  version = "3.12.0";
  version = "4.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "langfuse";
    repo = "langfuse-python";
    tag = "v${finalAttrs.version}";
    hash = "sha256-LHKNy5KSJhRhxkrp4+pjD0GGHTooaj7adrRA7I4mbdo=";
    hash = "sha256-JJfVh09ziAnizQcUusjEJPLUBpi9o04gfBysO+hA6Fg=";
  };

  # https://github.com/langfuse/langfuse/issues/9618
  disabled = pythonAtLeast "3.14";

  build-system = [ poetry-core ];

  pythonRelaxDeps = [ "packaging" ];

  dependencies = [
    anyio
    backoff
    httpx
    idna
    opentelemetry-api
    opentelemetry-sdk
    opentelemetry-exporter-otlp
    packaging
    pydantic
    requests
    wrapt
  ];

  optional-dependencies = {
    langchain = [ langchain ];
    llama-index = [ llama-index ];
    openai = [ openai ];
  };

  pythonImportsCheck = [ "langfuse" ];

  # tests require network access and openai api key