1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 poetry-core,
6 numpy,
7 pydantic,
8 jsonschema,
9 opencv-python-headless,
10 sentencepiece,
11 typing-extensions,
12 tiktoken,
13 pillow,
14 requests,
15}:
16
17buildPythonPackage rec {
18 pname = "mistral-common";
19 version = "1.5.4";
20 pyproject = true;
21
22 src = fetchPypi {
23 pname = "mistral_common";
24 inherit version;
25 hash = "sha256-CvQSSrCdFAl2HpHsYWgUdogtRvlBjuqJCNOcASIuD2s=";
26 };
27
28 pythonRelaxDeps = [
29 "pillow"
30 "tiktoken"
31 ];
32
33 build-system = [ poetry-core ];
34
35 dependencies = [
36 numpy
37 pydantic
38 jsonschema
39 opencv-python-headless
40 sentencepiece
41 typing-extensions
42 tiktoken
43 pillow
44 requests
45 ];
46
47 doCheck = true;
48
49 pythonImportsCheck = [ "mistral_common" ];
50
51 meta = with lib; {
52 description = "mistral-common is a set of tools to help you work with Mistral models.";
53 homepage = "https://github.com/mistralai/mistral-common";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ bgamari ];
56 };
57}