Skip to content

Google Vertex Chat Model node#

ใช้ Google Vertex AI Chat Model node เพื่อใช้งานโมเดลแชทของ Google Vertex AI กับ conversational agents

ในหน้านี้จะมีพารามิเตอร์ของ node Google Vertex AI Chat Model และลิงก์ไปยังแหล่งข้อมูลเพิ่มเติม

Credentials

คุณสามารถดูข้อมูลการเชื่อมต่อสำหรับ 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#

  • Project ID: เลือก Project ID จาก Google Cloud ของคุณ n8n จะโหลดโปรเจกต์จากบัญชี Google Cloud ของคุณแบบอัตโนมัติ หรือจะกรอกเองก็ได้
  • Model Name: เลือกชื่อโมเดลที่ต้องการให้สร้างข้อความตอบกลับ เช่น gemini-1.5-flash-001, gemini-1.5-pro-001 เป็นต้น ดูรายชื่อโมเดลได้ที่ Google models

Node options#

  • Maximum Number of Tokens: กำหนดจำนวน tokens สูงสุดที่ใช้ ซึ่งจะเป็นการกำหนดความยาวของข้อความที่โมเดลจะตอบกลับ
  • Sampling Temperature: ปรับความสุ่มของการสร้างข้อความ ค่า temperature สูงจะทำให้โมเดลตอบหลากหลายมากขึ้น แต่ก็เสี่ยงต่อการตอบแบบหลุดประเด็น
  • Top K: กำหนดจำนวนตัวเลือก token ที่โมเดลจะใช้ในการสร้าง token ถัดไป
  • Top P: กำหนดความน่าจะเป็นรวมที่โมเดลจะใช้ในการเลือก token ถัดไป ค่า Top P ต่ำจะตัดตัวเลือกที่มีความน่าจะเป็นน้อยออก
  • Safety Settings: Gemini รองรับการตั้งค่าความปลอดภัย สามารถดูรายละเอียดได้ที่ Gemini API safety settings

Templates and examples#

Browse Google Vertex Chat Model integration templates, or search all templates

ดูข้อมูลเพิ่มเติมได้ที่ LangChain's Google Vertex AI 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.