Commit e38bce9d authored by happysalada's avatar happysalada
Browse files

python310Packages.tokentrim: init at unstable-2023-09-07

python310Packages.tokentrim: disable tests
parent e66e868f
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, tiktoken
}:

buildPythonPackage {
  pname = "tokentrim";
  version = "unstable-2023-09-07";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "KillianLucas";
    repo = "tokentrim";
    rev = "e98ad3a2ca0e321a7347f76c30be584175495139";
    hash = "sha256-95xitHnbFFaj0xPuLMWvIvuJzoCO3VSd592X1RI9h3A=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    tiktoken
  ];

  pythonImportsCheck = [ "tokentrim" ];

  # tests connect to openai
  doCheck = false;

  meta = with lib; {
    description = "Easily trim 'messages' arrays for use with GPTs";
    homepage = "https://github.com/KillianLucas/tokentrim";
    license = licenses.mit;
    maintainers = with maintainers; [ happysalada ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -12933,6 +12933,8 @@ self: super: with self; {

  tokenlib = callPackage ../development/python-modules/tokenlib { };

  tokentrim = callPackage ../development/python-modules/tokentrim { };

  tololib = callPackage ../development/python-modules/tololib { };

  toml = callPackage ../development/python-modules/toml { };