Workflow Retriever node#
ใช้ Workflow Retriever node เพื่อดึงข้อมูลจาก workflow ของ n8n ไปใช้กับ Retrieval QA Chain หรือ Retriever node อื่นๆ
ในหน้านี้จะมี parameter ของ node Workflow Retriever และลิงก์ resource อื่นๆ ที่เกี่ยวข้อง
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#
Source#
บอก n8n ว่าจะเรียก workflow ไหน โดยเลือกได้ระหว่าง:
- Database แล้วใส่ workflow ID
- Parameter แล้วใส่ workflow JSON ทั้งหมด
Workflow values#
Workflow Values (ค่าสำหรับ Workflow)#
ตั้งค่าที่จะส่งต่อไปยัง workflow ที่คุณกำลังเรียกใช้
ค่าเหล่านี้จะปรากฏในข้อมูล output ของ trigger node ใน workflow ที่คุณเรียก คุณสามารถเข้าถึงค่าเหล่านี้ใน expression ภายใน workflow ตัวอย่างเช่น ถ้าคุณมี:
- Workflow Values ที่มี Name เป็น
myCustomValue
- Workflow ที่มี Execute Sub-workflow Trigger node เป็น trigger
Expression เพื่อเข้าถึงค่าของ myCustomValue
คือ {{ $('Execute Sub-workflow Trigger').item.json.myCustomValue }}
Templates and examples#
Related resources#
ดูข้อมูลเพิ่มเติมได้ที่ LangChain's general retriever documentation
ดูเอกสาร Advanced AI ของ n8n
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.