langchain_community.document_loaders.tencent_cos_directory
.TencentCOSDirectoryLoader¶
- class langchain_community.document_loaders.tencent_cos_directory.TencentCOSDirectoryLoader(conf: Any, bucket: str, prefix: str = '')[source]¶
从`腾讯云 COS`目录加载。
使用COS配置、存储桶和前缀进行初始化。 :param conf(CosConfig): COS配置。 :param bucket(str): COS存储桶。 :param prefix(str): 前缀。
Methods
__init__
(conf, bucket[, prefix])使用COS配置、存储桶和前缀进行初始化。 :param conf(CosConfig): COS配置。 :param bucket(str): COS存储桶。 :param prefix(str): 前缀。
一个用于文档的惰性加载器。
aload
()将数据加载到文档对象中。
加载文档。
load
()将数据加载到文档对象中。
load_and_split
([text_splitter])加载文档并分割成块。块作为文档返回。
- Parameters
conf (Any) –
bucket (str) –
prefix (str) –
- __init__(conf: Any, bucket: str, prefix: str = '')[source]¶
使用COS配置、存储桶和前缀进行初始化。 :param conf(CosConfig): COS配置。 :param bucket(str): COS存储桶。 :param prefix(str): 前缀。
- Parameters
conf (Any) –
bucket (str) –
prefix (str) –
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document] ¶
加载文档并分割成块。块作为文档返回。
不要覆盖此方法。应该被视为已弃用!
- 参数:
- text_splitter: 用于分割文档的TextSplitter实例。
默认为RecursiveCharacterTextSplitter。
- 返回:
文档列表。
- Parameters
text_splitter (Optional[TextSplitter]) –
- Return type
List[Document]