diff --git a/llama_stack/providers/impls/meta_reference/datasetio/datasetio.py b/llama_stack/providers/impls/meta_reference/datasetio/datasetio.py index 686c100f9..a96d9bcab 100644 --- a/llama_stack/providers/impls/meta_reference/datasetio/datasetio.py +++ b/llama_stack/providers/impls/meta_reference/datasetio/datasetio.py @@ -138,7 +138,7 @@ class MetaReferenceDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate): if page_token and not page_token.isnumeric(): raise ValueError("Invalid page_token") - if page_token is None: + if page_token is None or len(page_token) == 0: next_page_token = 0 else: next_page_token = int(page_token)