async def aload_data(
        self,
        file_path: Union[List[FilePath], FilePath],
        file_type: Union[List[FilePath], FilePath] = None,
        **load_kwargs: Any,
    ) -> List[Document]:
        """Load data from the input path."""
        if isinstance(file_path, (str, Path)):
            doc = await self._aload_data(str(file_path), file_type, **load_kwargs)
            return [doc]
        elif isinstance(file_path, list):
            if isinstance(file_type, list) and len(file_type) != len(file_path):
                raise ValueError(
                    "The length of file_type must be the same as file_path."
                )
            else:
                file_type = [file_type] * len(file_path)
            jobs = [
                self._aload_data(
                    str(f),
                    t,
                    **load_kwargs,
                )
                for f, t in zip(file_path, file_type)
            ]
            return await run_jobs(
                jobs,
                workers=self.num_workers,
                desc="Parsing files",
                show_progress=self.show_progress,
            )
        else:
            raise ValueError(
                "The input file_path must be a string or a list of strings."
            )
Load data from the input path.
llama-index-integrations/readers/llama-index-readers-alibabacloud-aisearch/llama_index/readers/alibabacloud_aisearch/base.py