1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 hatch-jupyter-builder,
8 hatch-nodejs-version,
9 hatchling,
10 jupyterlab,
11
12 # dependencies
13 ipywidgets,
14
15 # tests
16 nbval,
17 pytest-cov-stub,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "guidance-stitch";
23 version = "0.1.5";
24 pyproject = true;
25
26 src = fetchPypi {
27 pname = "guidance_stitch";
28 inherit version;
29 hash = "sha256-Kg0O3oZds4eFfUlKe8sakDYhwT9XGGnN4RCcLFVpzZU=";
30 };
31
32 build-system = [
33 hatch-jupyter-builder
34 hatch-nodejs-version
35 hatchling
36 jupyterlab
37 ];
38
39 dependencies = [
40 ipywidgets
41 ];
42
43 pythonImportsCheck = [ "stitch" ];
44
45 nativeCheckInputs = [
46 nbval
47 pytest-cov-stub
48 pytestCheckHook
49 ];
50
51 __darwinAllowLocalNetworking = true;
52
53 meta = {
54 description = "Guidance language for controlling large language models";
55 homepage = "https://github.com/guidance-ai/guidance/tree/main/packages/python/stitch";
56 license = lib.licenses.mit;
57 maintainers = with lib.maintainers; [ GaetanLepage ];
58 };
59}