get_loader

Function

Obtains a document loader.

Prototype

def get_loader(file_suffix)

Parameters

Parameter

Data Type

Required/Optional

Description

file_suffix

String

Required

File name extension. The length range is [1, 32]. For example, the value can be ".txt" or ".docx".

Return Value

Parameter

Description

LoaderInfo

The returned LoaderInfo instance contains the information about the loader of the corresponding file type, including the loader class and the parameters to be passed.