Default Data Loader node#
ใช้ Default Data Loader node เพื่อโหลดไฟล์ข้อมูลไบนารี (binary data files) หรือข้อมูล JSON สำหรับ vector stores หรือการสรุปผล (summarization)
ในหน้านี้ คุณจะพบรายการพารามิเตอร์ที่ Default Data Loader 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#
- Type of Data: เลือก Binary หรือ JSON
- Data Format: แสดงเมื่อคุณตั้งค่า Type of Data เป็น Binary เลือกประเภท MIME ของไฟล์สำหรับข้อมูลไบนารีของคุณ ตั้งค่าเป็น Automatically Detect by MIME Type หากคุณต้องการให้ n8n ตั้งค่ารูปแบบข้อมูลให้คุณ หากคุณตั้งค่ารูปแบบข้อมูลเฉพาะและประเภท MIME ของไฟล์ที่เข้ามาไม่ตรงกัน โหนดจะเกิดข้อผิดพลาด หากคุณใช้ Automatically Detect by MIME Type โหนดจะกลับไปใช้รูปแบบข้อความ (text format) หากไม่สามารถจับคู่ประเภท MIME ของไฟล์กับรูปแบบข้อมูลที่รองรับได้
- Mode: แสดงเมื่อคุณตั้งค่า Type of Data เป็น JSON เลือกจาก:
- Load All Input Data: ใช้ข้อมูลอินพุตทั้งหมดของโหนด
- Load Specific Data: ใช้ expressions เพื่อกำหนดข้อมูลที่คุณต้องการโหลด คุณสามารถเพิ่มข้อความและ expressions ได้ ซึ่งหมายความว่าคุณสามารถสร้างเอกสารที่กำหนดเองจากส่วนผสมของข้อความและ expressions ได้
Node options#
- Metadata: ตั้งค่า metadata ที่ควรมาพร้อมกับเอกสารใน vector store นี่คือสิ่งที่คุณจับคู่โดยใช้ตัวเลือก Metadata Filter เมื่อดึงข้อมูลโดยใช้โหนด vector store
Templates and examples#
Related resources#
อ้างอิง LangChain's documentation on document loaders สำหรับข้อมูลเพิ่มเติมเกี่ยวกับบริการนี้
ดูเอกสาร 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.