Embeddings OpenAI node#
ใช้ Embeddings OpenAI node เพื่อสร้าง embeddings สำหรับข้อความที่กำหนด
ในหน้านี้ คุณจะพบพารามิเตอร์ของโหนดสำหรับ Embeddings OpenAI node และลิงก์ไปยังแหล่งข้อมูลเพิ่มเติม
Credentials
คุณสามารถดูข้อมูลการยืนยันตัวตนสำหรับโหนดนี้ได้ ที่นี่
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 options#
- Model: เลือกรุ่น (model) ที่จะใช้สร้าง embeddings
- Base URL: ป้อน URL เพื่อส่งคำขอไป ใช้ตัวเลือกนี้หากคุณใช้โมเดลคล้าย OpenAI ที่โฮสต์เอง (self-hosted)
- Batch Size: ป้อนจำนวนเอกสารสูงสุดที่จะส่งในแต่ละคำขอ
- Strip New Lines: เลือกว่าจะลบอักขระขึ้นบรรทัดใหม่ (new line characters) ออกจากข้อความอินพุต (เปิด) หรือไม่ (ปิด) n8n เปิดใช้งานตัวเลือกนี้เป็นค่าเริ่มต้น
- Timeout: ป้อนระยะเวลาสูงสุดที่คำขอสามารถใช้ได้เป็นวินาที ตั้งค่าเป็น
-1
หากไม่ต้องการกำหนดเวลาหมดอายุ (timeout)
Templates and examples#
Related resources#
อ้างอิง เอกสารประกอบ OpenAI embeddings ของ LangChain สำหรับข้อมูลเพิ่มเติมเกี่ยวกับบริการนี้
ดูเอกสาร 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.