Class TextLoader
java.lang.Object
com.hw.langchain.document.loaders.base.BaseLoader
com.hw.langchain.document.loaders.text.TextLoader
Load text files.
- Author:
- HamaWhite
-
Constructor Summary
ConstructorDescriptionTextLoader
(String filePath) TextLoader
(String filePath, Charset encoding, boolean autodetectEncoding) Load text files. -
Method Summary
Methods inherited from class com.hw.langchain.document.loaders.base.BaseLoader
errorMessage
-
Constructor Details
-
TextLoader
-
TextLoader
Load text files.- Parameters:
filePath
- Path to the file to load.encoding
- File encoding to use. If `null`, the file will be loaded with the default system encoding.autodetectEncoding
- Whether to try to autodetect the file encoding if the specified encoding fails.
-
-
Method Details
-
load
Load from file path.- Specified by:
load
in classBaseLoader
- Returns:
- a List which is materialized in memory.
-