31 buildPythonPackage rec {
36 src = fetchFromGitHub {
39 rev = "refs/tags/${version}";
40 hash = "sha256-iPTZFXypcpO+PkcJHTdpkpiIU589XPcy+aNO/JqASCQ=";
50 build-system = [ poetry-core ];
75 pythonImportsCheck = [ "instructor" ];
78 # Tests require OpenAI API key
80 "test_mode_functions_deprecation_warning"
83 # Requires unpackaged `vertexai`
84 "test_json_preserves_description_of_non_english_characters_in_json_mode"
88 # Tests require OpenAI API key
89 "tests/test_distil.py"
94 broken = lib.versionOlder pydantic.version "2"; # ImportError: cannot import name 'TypeAdapter' from 'pydantic'
95 description = "Structured outputs for llm";
96 homepage = "https://github.com/jxnl/instructor";
97 changelog = "https://github.com/jxnl/instructor/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
98 license = lib.licenses.mit;
99 maintainers = with lib.maintainers; [ mic92 ];
100 mainProgram = "instructor";