Skip to content

Structured Output Parser node#

ใช้ Structured Output Parser node เพื่อคืนค่า fields ตาม JSON Schema

ในหน้านี้ คุณจะพบพารามิเตอร์ของโหนดสำหรับ Structured Output Parser node และลิงก์ไปยังแหล่งข้อมูลเพิ่มเติม

Parameter resolution in sub-nodes (การประมวลผล Parameter ใน sub-nodes)

Sub-nodes มีพฤติกรรมแตกต่างจาก node อื่นๆ เมื่อประมวลผลหลายรายการโดยใช้ expression

Node ส่วนใหญ่ รวมถึง root node จะรับ input กี่รายการก็ได้ ประมวลผลรายการเหล่านี้ และส่ง output ออกมา คุณสามารถใช้ expression เพื่ออ้างอิงถึง input item และ node จะประมวลผล expression สำหรับแต่ละ item ตามลำดับ ตัวอย่างเช่น หากมี input เป็นค่า name ห้ารายการ expression {{ $json.name }} จะถูกประมวลผลเป็นแต่ละชื่อตามลำดับ

ใน sub-nodes expression จะถูกประมวลผลเป็น item แรกเสมอ ตัวอย่างเช่น หากมี input เป็นค่า name ห้ารายการ expression {{ $json.name }} จะถูกประมวลผลเป็นชื่อแรกเสมอ

Node parameters#

  • Schema Type: กำหนดโครงสร้าง output และการตรวจสอบความถูกต้อง คุณมีสองตัวเลือกในการระบุ schema:
  1. Generate from JSON Example (สร้างจากตัวอย่าง JSON): ป้อนตัวอย่าง JSON object เพื่อสร้าง schema โดยอัตโนมัติ node จะใช้ประเภทและชื่อ property ของ object โดยไม่สนใจค่าจริง
  2. Define Below (กำหนดด้านล่าง): ป้อน JSON schema ด้วยตนเอง อ่าน JSON Schema guides and examples เพื่อช่วยในการสร้าง JSON schema ที่ถูกต้อง

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

อ้างอิง LangChain's output parser documentation สำหรับข้อมูลเพิ่มเติมเกี่ยวกับบริการ

ดูเอกสาร Advanced AI ของ n8n

Common issues#

สำหรับคำถามหรือปัญหาทั่วไปและแนวทางแก้ไขที่แนะนำ โปรดดูที่ Common issues

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.