Skip to content

默认数据加载器节点#

使用默认数据加载器节点可以加载二进制数据文件或 JSON 数据,用于向量存储或摘要生成。

本页将介绍默认数据加载器节点支持的参数列表,并提供更多资源的链接。

/// 注意 | 子节点中的参数解析 子节点在使用表达式处理多个项目时的行为与其他节点不同。

大多数节点(包括根节点)会接收任意数量的输入项,处理这些项目,然后输出结果。您可以使用表达式来引用输入项,节点会依次为每个项目解析表达式。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 会依次解析为每个名称。

而在子节点中,表达式总是解析为第一个项目。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 总是解析为第一个名称。 ///

节点参数#

  • 数据类型: 选择 Binary(二进制)或 JSON
  • 数据格式: 当数据类型设置为 Binary 时显示。为二进制数据选择文件 MIME 类型。如果希望 n8n 自动设置数据格式,请选择 Automatically Detect by MIME Type(按 MIME 类型自动检测)。如果设置了特定数据格式而传入文件的 MIME 类型不匹配,节点会报错。如果使用 Automatically Detect by MIME Type,当无法将文件 MIME 类型匹配到支持的数据格式时,节点会回退到文本格式。
  • 模式: 可选择:
    • Load All Input Data(加载所有输入数据): 使用节点的所有输入数据。
    • Load Specific Data(加载特定数据): 使用表达式定义要加载的数据。您可以添加文本和表达式,这意味着可以从文本和表达式的混合中创建自定义文档。

节点选项#

  • 元数据: 设置应随文档一起存储在向量存储中的元数据。在使用向量存储节点检索数据时,这些元数据将与元数据过滤器选项匹配。

模板和示例#

Browse 默认数据加载器 integration templates, or search all templates

相关资源#

请参考 LangChain 关于文档加载器的文档 获取有关该服务的更多信息。

查看 n8n 的高级 AI 文档。

AI glossary#

  • completion: Completions are the responses generated by a model like GPT.
  • hallucinations: Hallucination in AI is when an LLM (large language model) mistakenly perceives patterns or objects that don't exist.
  • vector database: A vector database stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.
  • vector store: A vector store, or vector database, stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.