HTTP Request Tool node#
Legacy tool version
ถ้าคุณเพิ่ม HTTP Request tool node ใหม่ใน workflow ตอนนี้จะใช้ node HTTP Request แบบมาตรฐานเป็น tool อัตโนมัติ หน้านี้อธิบายเฉพาะเวอร์ชัน legacy ของ HTTP Request tool node
คุณสามารถดูว่า workflow ของคุณใช้ tool เวอร์ชันไหนได้โดยดูว่ามีปุ่ม Add option ใน node หรือไม่ ถ้ามีปุ่มนี้ แสดงว่าคุณใช้เวอร์ชันใหม่ ไม่ใช่เวอร์ชันที่อธิบายไว้ในหน้านี้
HTTP Request tool ทำงานเหมือนกับ HTTP Request node ปกติ แต่ถูกออกแบบมาให้ใช้กับ AI agent เป็น tool เพื่อดึงข้อมูลจากเว็บไซต์หรือ API
ในหน้านี้จะมีรายการ operation ที่ HTTP Request node รองรับ และลิงก์ไปยัง resource อื่นๆ
Credentials
ดูวิธีตั้งค่า authentication ได้ที่ HTTP Request 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 }}
จะถูกประมวลผลเป็นชื่อแรกเสมอ
Templates and examples#
Related resources#
อ้างอิง LangChain's documentation on tools สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ tools ใน 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.