跳转至

结构化输出解析器节点#

使用结构化输出解析器节点基于 JSON 模式返回字段。

在此页面上,您将找到结构化输出解析器节点的节点参数以及更多资源的链接。

子节点中的参数解析

子节点在使用表达式处理多个项目时,与其他节点的行为不同。

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

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

Node parameters#

  • Schema Type: Define the output structure and validation. You have two options to provide the schema:
  1. 从 JSON 示例生成:输入示例 JSON 对象以自动生成模式。节点使用对象属性类型和名称。它忽略实际值。n8n 在从 JSON 示例生成模式时将每个字段都视为必需的。
  2. 使用 JSON Schema 定义:手动输入 JSON 模式。阅读 JSON Schema 指南和示例以获取创建有效 JSON 模式的帮助。请注意,我们不支持 JSON 模式中的引用(使用 $ref)。

Templates and examples#

✨🤖Automate Multi-Platform Social Media Content Creation with AI

by Joseph LePage

View template details
AI-Powered Social Media Content Generator & Publisher

by Amjid Ali

View template details
Chat with PDF docs using AI (quoting sources)

by David Roberts

View template details
Browse Structured Output Parser integration templates, or search all templates

Refer to LangChain's output parser documentation for more information about the service.

查看 n8n 的高级 AI 文档。

Common issues#

For common questions or issues and suggested solutions, refer to Common issues.

此页面是否
💬 微信

🚀 与作者交流

关注公众号
n8n实战笔记公众号
n8n实战笔记
📚 教程 💡 案例 🔧 技巧
添加微信
添加作者微信
1对1 专业指导
⚡ 快答 🎯 定制 🚀 支持