summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/llm-command-r/default.nix
blob: 386973b2df4a244e8dc3c0405191c79b87190910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  llm,
  llm-command-r,
  cohere,
  pytestCheckHook,
  pytest-recording,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "llm-command-r";
  version = "0.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "simonw";
    repo = "llm-command-r";
    tag = version;
    hash = "sha256-PxICRds9NJQP64HwoL7Oxd39yaIrMdAyQEbhaumJCgo=";
  };

  build-system = [ setuptools ];

  dependencies = [
    cohere
    llm
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-recording
    writableTmpDirAsHomeHook
  ];

  pythonImportsCheck = [ "llm_command_r" ];

  passthru.tests = llm.mkPluginTest llm-command-r;

  meta = {
    description = "Access the Cohere Command R family of models";
    homepage = "https://github.com/simonw/llm-command-r";
    changelog = "https://github.com/simonw/llm-command-r/releases/tag/${version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ philiptaron ];
  };
}