Ollama Chat Model node#
Ollama Chat Model node ช่วยให้คุณใช้โมเดล Llama 2 บนเครื่อง local กับ agents แบบสนทนาได้
ในหน้านี้ คุณจะพบ node parameters สำหรับ Ollama Chat Model node และลิงก์ไปยังแหล่งข้อมูลเพิ่มเติม
Credentials
คุณสามารถดูข้อมูล authentication สำหรับโหนดนี้ได้ ที่นี่
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#
- Model: เลือกโมเดลที่จะใช้สร้าง completion เลือกจาก:
- Llama2
- Llama2 13B
- Llama2 70B
- Llama2 Uncensored
อ้างอิง Models Library documentation ของ Ollama สำหรับข้อมูลเพิ่มเติมเกี่ยวกับโมเดลที่มีให้ใช้งาน
Node options#
- Sampling Temperature: ใช้ตัวเลือกนี้เพื่อควบคุมความสุ่มของการสุ่มตัวอย่าง (sampling process) ค่า temperature ที่สูงขึ้นจะสร้างการสุ่มตัวอย่างที่หลากหลายมากขึ้น แต่เพิ่มความเสี่ยงที่จะเกิดภาพหลอน (hallucinations)
- Top K: ป้อนจำนวนตัวเลือก token ที่โมเดลใช้ในการสร้าง token ถัดไป
- Top P: ใช้ตัวเลือกนี้เพื่อกำหนดค่าความน่าจะเป็น (probability) ที่ completion ควรใช้ ใช้ค่าที่ต่ำลงเพื่อละเว้นตัวเลือกที่มีความน่าจะเป็นน้อยกว่า
Templates and examples#
Related resources#
อ้างอิง LangChain's Ollama Chat Model 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.
Self-hosted AI Starter Kit#
เพิ่งเริ่มต้นทำงานกับ AI และใช้ n8n แบบ Self-hosted ใช่ไหม? ลองใช้ self-hosted AI Starter Kit ของ n8n เพื่อเริ่มต้นสร้าง Proof-of-Concept หรือ Playground สำหรับทดลอง โดยใช้ Ollama, Qdrant และ PostgreSQL