diff --git a/outlines/fsm/json_schema.py b/outlines/fsm/json_schema.py index 91f3ac7b6..04d16d672 100644 --- a/outlines/fsm/json_schema.py +++ b/outlines/fsm/json_schema.py @@ -2,7 +2,7 @@ import json import re from copy import deepcopy -from typing import Callable, Optional +from typing import Callable, List, Optional from jsonschema.protocols import Validator from pydantic import create_model @@ -106,7 +106,7 @@ def _is_null_type(instance: dict): return False -def _has_null_type(instance_list: list[dict]): +def _has_null_type(instance_list: List[dict]): for instance in instance_list: if _is_null_type(instance): return True