diff --git a/python/cocoindex/flow.py b/python/cocoindex/flow.py index db53004f..d1378954 100644 --- a/python/cocoindex/flow.py +++ b/python/cocoindex/flow.py @@ -657,7 +657,7 @@ async def _update_flow(name: str, fl: Flow) -> tuple[str, _engine.IndexUpdateInf def _get_data_slice_annotation_type(data_slice_type: Type[DataSlice[T]]) -> Type[T] | None: type_args = get_args(data_slice_type) - if data_slice_type is DataSlice: + if data_slice_type is inspect.Parameter.empty or data_slice_type is DataSlice: return None if get_origin(data_slice_type) != DataSlice or len(type_args) != 1: raise ValueError(f"Expect a DataSlice[T] type, but got {data_slice_type}")