Merge pull request #312953 from Moraxyc/add-llmx
python3Packages.llmx: init at 0.0.21a0
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools-scm,
|
||||
setuptools,
|
||||
pythonOlder,
|
||||
pydantic,
|
||||
openai,
|
||||
tiktoken,
|
||||
diskcache,
|
||||
cohere,
|
||||
google-auth,
|
||||
typer,
|
||||
pyyaml,
|
||||
transformers,
|
||||
fastapi,
|
||||
uvicorn,
|
||||
accelerate,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llmx";
|
||||
version = "0.0.21a0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-OEo6wIaDTktzAsP0rOmhxjFSHygTR/EpcRI6AXsu+6M=";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
pydantic
|
||||
openai
|
||||
tiktoken
|
||||
diskcache
|
||||
cohere
|
||||
google-auth
|
||||
typer
|
||||
pyyaml
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
web = [
|
||||
fastapi
|
||||
uvicorn
|
||||
];
|
||||
transformers = [
|
||||
accelerate
|
||||
transformers
|
||||
] ++ transformers.optional-dependencies.torch;
|
||||
};
|
||||
|
||||
# Tests of llmx try to access openai, google, etc.
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "llmx" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for LLM Text Generation";
|
||||
homepage = "https://github.com/victordibia/llmx";
|
||||
mainProgram = "llmx";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ moraxyc ];
|
||||
};
|
||||
}
|
||||
@@ -6951,6 +6951,8 @@ self: super: with self; {
|
||||
|
||||
llm = callPackage ../development/python-modules/llm { };
|
||||
|
||||
llmx = callPackage ../development/python-modules/llmx { };
|
||||
|
||||
llvmlite = callPackage ../development/python-modules/llvmlite {
|
||||
# llvmlite always requires a specific version of llvm.
|
||||
llvm = pkgs.llvm_14;
|
||||
|
||||
Reference in New Issue
Block a user