AI & LLM
AI model integration, text generation, embeddings, and autonomous agents.
18 modules
| Module | Description |
|---|---|
| ตัวแทนอัตโนมัติ | AI agent ที่ควบคุมตัวเองพร้อมหน่วยความจำและพฤติกรรมมุ่งเป้าหมาย |
| ตัวแทนแบบลูกโซ่ | ห่วงโซ่การประมวลผล AI แบบลำดับพร้อมหลายขั้นตอน |
| Agent การใช้เครื่องมือ | AI Agent ที่สามารถเรียกใช้เครื่องมือ/ฟังก์ชันได้ |
| การฝังข้อความ | สร้างเวกเตอร์ฝังจากข้อความโดยใช้โมเดล AI |
| AI ดึงข้อมูล | ดึงข้อมูลที่มีโครงสร้างจากข้อความโดยใช้ AI |
| Local Ollama Chat | แชทกับ LLM ในเครื่องผ่าน Ollama (ออฟไลน์อย่างสมบูรณ์) |
| AI Memory | หน่วยความจำการสนทนาสำหรับ AI Agent |
| Entity Memory | ดึงและติดตาม entity (บุคคล สถานที่ แนวคิด) จากการสนทนา |
| Redis Memory | หน่วยความจำการสนทนาถาวรโดยใช้การจัดเก็บ Redis |
| Vector Memory | หน่วยความจำเชิงความหมายโดยใช้ vector embeddings สำหรับการดึงบริบทที่เกี่ยวข้อง |
| AI Model | การกำหนดค่าโมเดล LLM สำหรับ AI Agent |
| AI Tool | Expose a module as a tool for AI Agent |
| การวิเคราะห์วิชั่น | วิเคราะห์ภาพโดยใช้โมเดล AI วิชั่น |
| Claude Chat | ส่งข้อความแชทไปยัง Anthropic Claude AI และรับการตอบกลับ |
| Google Gemini Chat | ส่งข้อความแชทไปยัง Google Gemini AI และรับการตอบกลับ |
| OpenAI Chat | ส่งข้อความแชทไปยังโมเดล OpenAI GPT |
| DALL-E Image Generation | สร้างรูปภาพโดยใช้ DALL-E |
| AI Agent | AI Agent อัตโนมัติพร้อมการเชื่อมต่อหลายพอร์ต (โมเดล, หน่วยความจำ, เครื่องมือ) |
Modules
ตัวแทนอัตโนมัติ
agent.autonomous
AI agent ที่ควบคุมตัวเองพร้อมหน่วยความจำและพฤติกรรมมุ่งเป้าหมาย
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
goal | string | Yes | - | เป้าหมายที่ agent ต้องบรรลุ |
context | string | No | - | เป้าหมายที่ agent ต้องบรรลุ |
max_iterations | number | No | 5 | บริบทหรือข้อจำกัดเพิ่มเติม |
llm_provider | select (openai, ollama) | No | openai | ขั้นตอนการใช้เหตุผลสูงสุด |
model | string | No | gpt-4-turbo-preview | ชื่อโมเดล (เช่น gpt-4, llama2, mistral) |
ollama_url | string | No | http://localhost:11434 | ชื่อโมเดล (เช่น gpt-4, llama2, mistral) |
temperature | number | No | 0.7 | URL เซิร์ฟเวอร์ Ollama (เฉพาะสำหรับผู้ให้บริการ ollama) |
Output:
| Field | Type | Description |
|---|---|---|
result | string | ระดับความคิดสร้างสรรค์ (0-2) |
thoughts | array | ผลลัพธ์การดำเนินการ |
iterations | number | ผลลัพธ์การดำเนินการ |
goal_achieved | boolean | ขั้นตอนการใช้เหตุผลของ agent |
Example: Research task
goal: Research the latest trends in AI and summarize the top 3
max_iterations: 5
model: gpt-4Example: Problem solving
goal: Find the best approach to optimize database queries
context: PostgreSQL database with 10M records
max_iterations: 10ตัวแทนแบบลูกโซ่
agent.chain
ห่วงโซ่การประมวลผล AI แบบลำดับพร้อมหลายขั้นตอน
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
input | string | Yes | - | อินพุตเริ่มต้นสำหรับห่วงโซ่ |
chain_steps | array | Yes | - | อินพุตเริ่มต้นสำหรับห่วงโซ่ |
llm_provider | select (openai, ollama) | No | openai | อาร์เรย์ของขั้นตอนการประมวลผล (แต่ละตัวคือเทมเพลต prompt) |
model | string | No | gpt-4-turbo-preview | ชื่อโมเดล (เช่น gpt-4, llama2, mistral) |
ollama_url | string | No | http://localhost:11434 | ชื่อโมเดล (เช่น gpt-4, llama2, mistral) |
temperature | number | No | 0.7 | URL เซิร์ฟเวอร์ Ollama (เฉพาะสำหรับผู้ให้บริการ ollama) |
Output:
| Field | Type | Description |
|---|---|---|
result | string | ระดับความคิดสร้างสรรค์ (0-2) |
intermediate_results | array | ผลลัพธ์การดำเนินการ |
steps_completed | number | ผลลัพธ์การดำเนินการ |
Example: Content pipeline
input: AI and machine learning trends
chain_steps: ["Generate 5 blog post ideas about: {input}", "Take the first idea and write a detailed outline: {previous}", "Write an introduction paragraph based on: {previous}"]
model: gpt-4Example: Data analysis chain
input: User behavior data shows 60% bounce rate
chain_steps: ["Analyze what might cause this issue: {input}", "Suggest 3 solutions based on: {previous}", "Create an action plan from: {previous}"]Agent การใช้เครื่องมือ
agent.tool_use
AI Agent ที่สามารถเรียกใช้เครื่องมือ/ฟังก์ชันได้
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | เป้าหมายหรือภารกิจสำหรับเอเจนต์ |
tools | array | Yes | - | รายการคำจำกัดความของเครื่องมือ [{name, description, parameters}] |
provider | select (openai, anthropic) | No | openai | ผู้ให้บริการ LLM สำหรับเอเจนต์ |
model | string | No | gpt-4o | โมเดลที่จะใช้ |
api_key | string | No | - | คีย์ API (ใช้ตัวแปรสภาพแวดล้อมหากไม่มี) |
max_iterations | number | No | 10 | จำนวนรอบการเรียกใช้เครื่องมือสูงสุด |
system_prompt | string | No | - | คำถามระบบเสริมเพื่อแนะนำเอเจนต์ |
Output:
| Field | Type | Description |
|---|---|---|
result | string | คำตอบสุดท้ายของเอเจนต์ |
tool_calls | array | การเรียกใช้เครื่องมือทั้งหมดระหว่างการทำงาน |
iterations | number | จำนวนรอบที่ทำเสร็จแล้ว |
model | string | โมเดลที่ใช้ |
Example: File Processing Agent
prompt: Read the config file and update the version number
tools: [{"name": "read_file", "description": "Read contents of a file", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "File path"}}, "required": ["path"]}}, {"name": "write_file", "description": "Write contents to a file", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "File path"}, "content": {"type": "string", "description": "File content"}}, "required": ["path", "content"]}}]
provider: openai
model: gpt-4o
max_iterations: 5การฝังข้อความ
ai.embed
สร้างเวกเตอร์ฝังจากข้อความโดยใช้โมเดล AI
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | - | ข้อความที่จะฝัง |
provider | select (openai, local) | No | openai | ผู้ให้บริการ AI สำหรับการฝัง |
model | string | No | text-embedding-3-small | โมเดลการฝังที่ใช้ |
api_key | string | No | - | คีย์ API (ใช้ตัวแปรสิ่งแวดล้อมหากไม่มี) |
dimensions | number | No | - | มิติการฝัง (สำหรับโมเดลที่รองรับ) |
Output:
| Field | Type | Description |
|---|---|---|
embeddings | array | อาร์เรย์เวกเตอร์ฝัง |
model | string | โมเดลที่ใช้สำหรับการฝัง |
dimensions | number | จำนวนมิติในเวกเตอร์ฝัง |
token_count | number | จำนวนโทเค็นที่ประมวลผล |
Example: Single Text Embedding
text: The quick brown fox jumps over the lazy dog
provider: openai
model: text-embedding-3-smallExample: Reduced Dimensions
text: Semantic search query
provider: openai
model: text-embedding-3-small
dimensions: 256AI ดึงข้อมูล
ai.extract
ดึงข้อมูลที่มีโครงสร้างจากข้อความโดยใช้ AI
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | - | ข้อความที่ต้องการดึงข้อมูลจาก |
schema | object | Yes | - | สคีมา JSON ที่กำหนดฟิลด์ที่จะดึง |
instructions | string | No | - | คำแนะนำเพิ่มเติมในการดึงข้อมูล |
provider | select (openai, anthropic) | No | openai | ผู้ให้บริการ AI ที่ใช้ |
model | string | No | gpt-4o-mini | โมเดลที่ใช้สำหรับการดึงข้อมูล |
api_key | string | No | - | คีย์ API (ใช้ตัวแปรสิ่งแวดล้อมหากไม่มี) |
temperature | number | No | 0 | อุณหภูมิการสุ่มตัวอย่าง (0-2) |
Output:
| Field | Type | Description |
|---|---|---|
extracted | object | ข้อมูลที่มีโครงสร้างที่ดึงออกมา |
model | string | โมเดลที่ใช้สำหรับการดึงข้อมูล |
raw_response | string | การตอบสนองดิบจากโมเดล |
Example: Extract Contact Info
text: John Smith is a senior engineer at Acme Corp. Email: john@acme.com
schema: {"type": "object", "properties": {"name": {"type": "string"}, "title": {"type": "string"}, "company": {"type": "string"}, "email": {"type": "string"}}}
provider: openai
model: gpt-4o-miniExample: Extract Invoice Data
text: Invoice #1234 from Acme Corp. Total: $500.00. Due: 2024-03-01
schema: {"type": "object", "properties": {"invoice_number": {"type": "string"}, "vendor": {"type": "string"}, "total": {"type": "number"}, "due_date": {"type": "string"}}}
instructions: Extract all invoice fields. Parse amounts as numbers.Local Ollama Chat
ai.local_ollama.chat
แชทกับ LLM ในเครื่องผ่าน Ollama (ออฟไลน์อย่างสมบูรณ์)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | ข้อความที่จะส่งไปยัง LLM ในเครื่อง |
model | select (llama2, llama2:13b, llama2:70b, mistral, mixtral, codellama, codellama:13b, phi, neural-chat, starling-lm) | No | llama2 | ข้อความที่จะส่งไปยัง LLM ในเครื่อง |
temperature | number | No | 0.7 | Temperature ในการสุ่ม (0-2) |
system_message | string | No | - | ข้อความบทบาทระบบ (ไม่บังคับ) |
ollama_url | string | No | http://localhost:11434 | ข้อความบทบาทระบบ (ไม่บังคับ) |
max_tokens | number | No | - | URL เซิร์ฟเวอร์ Ollama |
Output:
| Field | Type | Description |
|---|---|---|
response | string | โทเค็นสูงสุดในการตอบกลับ (ไม่บังคับ ขึ้นอยู่กับโมเดล) |
model | string | การตอบกลับจากการดำเนินการ |
context | array | การตอบกลับจากการดำเนินการ |
total_duration | number | ชื่อโมเดลหรือตัวระบุ |
load_duration | number | บริบทการสนทนาสำหรับคำขอติดตาม |
prompt_eval_count | number | ระยะเวลาประมวลผลทั้งหมด |
eval_count | number | ระยะเวลาโหลดโมเดล |
Example: Simple local chat
prompt: Explain quantum computing in 3 sentences
model: llama2Example: Code generation with local model
prompt: Write a Python function to calculate fibonacci numbers
model: codellama
temperature: 0.2
system_message: You are a Python programming expert. Write clean, efficient code.Example: Local reasoning task
prompt: What are the pros and cons of microservices architecture?
model: mistral
temperature: 0.7AI Memory
ai.memory
หน่วยความจำการสนทนาสำหรับ AI Agent
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
memory_type | select (buffer, window, summary) | Yes | buffer | ประเภทการจัดเก็บหน่วยความจำ |
window_size | number | No | 10 | จำนวนข้อความล่าสุดที่จะเก็บ (สำหรับหน่วยความจำแบบหน้าต่าง) |
session_id | string | No | - | ตัวระบุเฉพาะสำหรับเซสชันการสนทนานี้ |
initial_messages | array | No | [] | ประวัติการสนทนาที่โหลดไว้ล่วงหน้า |
Output:
| Field | Type | Description |
|---|---|---|
memory_type | string | ประวัติการสนทนาที่โหลดไว้ล่วงหน้า |
session_id | string | ประวัติการสนทนาที่โหลดไว้ล่วงหน้า |
messages | array | ประเภทหน่วยความจำ |
config | object | ตัวระบุเซสชัน |
Example: Simple Buffer Memory
memory_type: bufferExample: Window Memory (last 5 messages)
memory_type: window
window_size: 5Entity Memory
ai.memory.entity
ดึงและติดตาม entity (บุคคล สถานที่ แนวคิด) จากการสนทนา
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
entity_types | multiselect | No | ['person', 'organization', 'location'] | Types of entities to extract and track |
extraction_model | select (llm, spacy, regex) | Yes | llm | Model for entity extraction |
session_id | string | No | - | Unique identifier for this memory session |
track_relationships | boolean | No | True | Track relationships between entities |
max_entities | number | No | 100 | Maximum number of entities to remember |
Output:
| Field | Type | Description |
|---|---|---|
memory_type | string | จำนวน entity สูงสุดที่จะจดจำ |
session_id | string | จำนวน entity สูงสุดที่จะจดจำ |
entities | object | ประเภทหน่วยความจำ (entity) |
relationships | array | ตัวระบุเซสชัน |
config | object | Entity ที่ติดตามตามประเภท |
Example: People & Organizations
entity_types: ["person", "organization"]
extraction_model: llmExample: Full Entity Tracking
entity_types: ["person", "organization", "location", "concept"]
track_relationships: true
max_entities: 200Redis Memory
ai.memory.redis
หน่วยความจำการสนทนาถาวรโดยใช้การจัดเก็บ Redis
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
redis_url | string | Yes | redis://localhost:6379 | Redis connection URL |
key_prefix | string | No | flyto:memory: | Prefix for all Redis keys |
session_id | string | Yes | - | Unique identifier for this memory session |
ttl_seconds | number | No | 86400 | Time-to-live for memory entries (0 = no expiry) |
max_messages | number | No | 100 | Maximum messages to store per session |
load_on_start | boolean | No | True | Load existing messages from Redis on initialization |
Output:
| Field | Type | Description |
|---|---|---|
memory_type | string | โหลดข้อความที่มีอยู่จาก Redis เมื่อเริ่มต้น |
session_id | string | โหลดข้อความที่มีอยู่จาก Redis เมื่อเริ่มต้น |
messages | array | ประเภทหน่วยความจำ (redis) |
connected | boolean | ตัวระบุเซสชัน |
config | object | ประวัติข้อความที่โหลด |
Example: Local Redis
redis_url: redis://localhost:6379
session_id: my-session
ttl_seconds: 3600Example: Cloud Redis with Auth
redis_url: redis://:password@redis-cloud.example.com:6379
session_id: user-session
ttl_seconds: 86400
max_messages: 500Vector Memory
ai.memory.vector
หน่วยความจำเชิงความหมายโดยใช้ vector embeddings สำหรับการดึงบริบทที่เกี่ยวข้อง
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
embedding_model | select (text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002, local) | Yes | text-embedding-3-small | Model to use for generating embeddings |
top_k | number | No | 5 | Number of most relevant memories to retrieve |
similarity_threshold | number | No | 0.7 | Minimum similarity score (0-1) for retrieval |
session_id | string | No | - | Unique identifier for this memory session |
include_metadata | boolean | No | True | Include timestamp and other metadata with memories |
Output:
| Field | Type | Description |
|---|---|---|
memory_type | string | รวม timestamp และ metadata อื่น ๆ กับหน่วยความจำ |
session_id | string | รวม timestamp และ metadata อื่น ๆ กับหน่วยความจำ |
embedding_model | string | ประเภทหน่วยความจำ (vector) |
config | object | ตัวระบุเซสชัน |
Example: Default Vector Memory
embedding_model: text-embedding-3-small
top_k: 5Example: High Precision Memory
embedding_model: text-embedding-3-large
top_k: 10
similarity_threshold: 0.85AI Model
ai.model
การกำหนดค่าโมเดล LLM สำหรับ AI Agent
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
provider | select (openai, anthropic, ollama) | No | openai | AI model provider |
model | string | No | gpt-4o | Specific model to use |
temperature | number | No | 0.7 | Creativity level (0=deterministic, 1=creative) |
api_key | string | No | - | API key (defaults to provider env var) |
base_url | string | No | - | Custom API base URL (for Ollama or proxies) |
max_tokens | number | No | 4096 | โทเค็นสูงสุดในการตอบกลับ |
Output:
| Field | Type | Description |
|---|---|---|
provider | string | โทเค็นสูงสุดในการตอบกลับ |
model | string | ชื่อผู้ให้บริการ LLM |
config | object | ชื่อผู้ให้บริการ LLM |
Example: OpenAI GPT-4
provider: openai
model: gpt-4o
temperature: 0.7Example: Anthropic Claude
provider: anthropic
model: claude-3-5-sonnet-20241022
temperature: 0.5AI Tool
ai.tool
Expose a module as a tool for AI Agent
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
module_id | string | Yes | - | Module ID to expose as tool (e.g. http.request, data.json_parse) |
tool_description | string | No | - | Custom description for the agent (overrides module default) |
Output:
| Field | Type | Description |
|---|---|---|
module_id | string | Module ID exposed as tool |
Example: HTTP Request Tool
module_id: http.requestExample: JSON Parse Tool
module_id: data.json_parseการวิเคราะห์วิชั่น
ai.vision.analyze
วิเคราะห์ภาพโดยใช้โมเดล AI วิชั่น
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
image_path | string | No | - | เส้นทางท้องถิ่นไปยังไฟล์ภาพ |
image_url | string | No | - | URL ของภาพที่ต้องการวิเคราะห์ |
prompt | string | No | Describe this image in detail | ต้องการวิเคราะห์หรือถามเกี่ยวกับภาพอะไร |
provider | select (openai, anthropic) | No | openai | ผู้ให้บริการ AI สำหรับการวิเคราะห์วิชั่น |
model | string | No | gpt-4o | โมเดลวิชั่นที่ใช้ |
api_key | string | No | - | คีย์ API (ใช้ตัวแปรสิ่งแวดล้อมหากไม่มี) |
max_tokens | number | No | 1000 | จำนวนโทเค็นสูงสุดในการตอบสนอง |
detail | select (low, high, auto) | No | auto | ระดับรายละเอียดของภาพ (ต่ำ/สูง/อัตโนมัติ) |
Output:
| Field | Type | Description |
|---|---|---|
analysis | string | การวิเคราะห์ภาพโดย AI |
model | string | โมเดลที่ใช้สำหรับการวิเคราะห์ |
provider | string | ผู้ให้บริการที่ใช้สำหรับการวิเคราะห์ |
tokens_used | number | จำนวนโทเค็นที่ใช้ |
Example: Analyze Screenshot
image_path: /tmp/screenshot.png
prompt: Describe what you see in this UI screenshot
provider: openai
model: gpt-4oExample: Analyze from URL
image_url: https://example.com/photo.jpg
prompt: What objects are in this image?
provider: anthropic
model: claude-sonnet-4-20250514Claude Chat
api.anthropic.chat
ส่งข้อความแชทไปยัง Anthropic Claude AI และรับการตอบกลับ
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | No | - | Anthropic API key (ค่าเริ่มต้น env.ANTHROPIC_API_KEY) |
model | string | No | claude-3-5-sonnet-20241022 | โมเดล Claude ที่จะใช้ |
messages | array | Yes | - | อาร์เรย์ของออบเจ็กต์ข้อความพร้อม role และ content |
max_tokens | number | No | 1024 | เนื้อหาที่ส่งคืนจากการดำเนินการ |
temperature | number | No | 1.0 | Temperature ในการสุ่ม (0-1) ค่าสูงทำให้เอาต์พุตสุ่มมากขึ้น |
system | string | No | - | System prompt เพื่อกำหนดพฤติกรรม Claude |
Output:
| Field | Type | Description |
|---|---|---|
content | string | System prompt เพื่อกำหนดพฤติกรรม Claude |
model | string | ข้อความตอบกลับของ Claude |
stop_reason | string | โมเดลที่ใช้สำหรับการตอบกลับ |
usage | object | เหตุผลที่โมเดลหยุดสร้าง (end_turn, max_tokens ฯลฯ) |
Example: Simple question
messages: [{"role": "user", "content": "What is the capital of France?"}]
max_tokens: 100Example: Text summarization
system: You are a helpful assistant that summarizes text concisely.
messages: [{"role": "user", "content": "Summarize this article: ${article_text}"}]
max_tokens: 500Google Gemini Chat
api.google_gemini.chat
ส่งข้อความแชทไปยัง Google Gemini AI และรับการตอบกลับ
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | No | - | Google AI API key (ค่าเริ่มต้น env.GOOGLE_AI_API_KEY) |
model | string | No | gemini-1.5-pro | โมเดล Gemini ที่จะใช้ |
prompt | string | Yes | - | ข้อความ prompt ที่จะส่งไปยัง Gemini |
temperature | number | No | 1.0 | ควบคุมความสุ่ม (0-2) ค่าสูงทำให้เอาต์พุตสุ่มมากขึ้น |
max_output_tokens | number | No | 2048 | จำนวนโทเค็นสูงสุดในการตอบกลับ |
Output:
| Field | Type | Description |
|---|---|---|
text | string | Generated text response from Gemini |
model | string | Model used for generation |
candidates | array | All candidate responses |
Example: Simple question
prompt: Explain quantum computing in simple termsExample: Content generation
prompt: Write a professional email about ${topic}
temperature: 0.7
max_output_tokens: 500OpenAI Chat
api.openai.chat
ส่งข้อความแชทไปยังโมเดล OpenAI GPT
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | ข้อความที่จะส่งไปยัง GPT |
model | select (gpt-4-turbo-preview, gpt-4, gpt-3.5-turbo) | No | gpt-4-turbo-preview | ข้อความที่จะส่งไปยัง GPT |
temperature | number | No | 0.7 | Temperature ในการสุ่ม (0-2) |
max_tokens | number | No | 1000 | Temperature ในการสุ่ม (0-2) |
system_message | string | No | - | โทเค็นสูงสุดในการตอบกลับ |
Output:
| Field | Type | Description |
|---|---|---|
response | string | ข้อความบทบาทระบบ (ไม่บังคับ) |
model | string | การตอบกลับจากการดำเนินการ |
usage | object | การตอบกลับจากการดำเนินการ |
Example: Simple chat
prompt: Explain quantum computing in 3 sentences
model: gpt-3.5-turboExample: Code generation
prompt: Write a Python function to calculate fibonacci numbers
model: gpt-4
temperature: 0.2
system_message: You are a Python programming expertDALL-E Image Generation
api.openai.image
สร้างรูปภาพโดยใช้ DALL-E
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | คำอธิบายรูปภาพที่จะสร้าง |
size | select (256x256, 512x512, 1024x1024, 1792x1024, 1024x1792) | No | 1024x1024 | คำอธิบายรูปภาพที่จะสร้าง |
model | select (dall-e-3, dall-e-2) | No | dall-e-3 | เวอร์ชันโมเดล DALL-E |
quality | select (standard, hd) | No | standard | คุณภาพรูปภาพ (DALL-E 3 เท่านั้น) |
n | number | No | 1 | จำนวนรูปภาพที่จะสร้าง (1-10) |
Output:
| Field | Type | Description |
|---|---|---|
images | array | List of generated images |
model | string | Model name or identifier |
Example: Generate artwork
prompt: A serene mountain landscape at sunset, digital art
size: 1024x1024
model: dall-e-3
quality: hdExample: Create logo
prompt: Modern tech startup logo with blue and green colors
size: 512x512
model: dall-e-2
n: 3AI Agent
llm.agent
AI Agent อัตโนมัติพร้อมการเชื่อมต่อหลายพอร์ต (โมเดล, หน่วยความจำ, เครื่องมือ)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt_source | select (manual, auto) | No | manual | ตำแหน่งที่จะรับ task prompt |
task | string | No | - | งานที่ต้องการให้ Agent ทำ ใช้ {{input}} เพื่ออ้างอิงข้อมูลต้นทาง |
prompt_path | string | No | {<!-- -->{input}<!-- -->} | พาธสำหรับดึง prompt จากอินพุต (เช่น {{input.message}}) |
join_strategy | select (first, newline, separator, json) | No | first | วิธีจัดการอินพุตอาร์เรย์ |
join_separator | string | No | ` |
| ตัวคั่นสำหรับรวมรายการในอาร์เรย์ | |max_input_size| number | No |10000| จำนวนอักขระสูงสุดสำหรับ prompt (ป้องกัน overflow) | |system_prompt| string | No |You are a helpful AI agent. Use the available tools to complete the task. Think step by step.| คำแนะนำสำหรับพฤติกรรมของ Agent | |tools| array | No |[]| รายการรหัสโมดูล (ทางเลือกแทนการเชื่อมต่อโหนดเครื่องมือ) | |context| object | No |{}| รายการรหัสโมดูล (ทางเลือกแทนการเชื่อมต่อโหนดเครื่องมือ) | |max_iterations| number | No |10| ข้อมูลบริบทเพิ่มเติมสำหรับ Agent | |provider | select (openai, anthropic, ollama) | No | openai| AI model provider | |model| string | No |gpt-4o| Specific model to use | |temperature| number | No |0.3| Creativity level (0=deterministic, 1=creative) | |api_key| string | No | - | API key (defaults to provider env var) | |base_url` | string | No | - | Custom API base URL (for Ollama or proxies) |
Output:
| Field | Type | Description |
|---|---|---|
ok | boolean | Agent ทำงานสำเร็จหรือไม่ |
result | string | Agent ทำงานสำเร็จหรือไม่ |
steps | array | Agent ทำงานสำเร็จหรือไม่ |
tool_calls | number | ผลลัพธ์สุดท้ายจาก Agent |
tokens_used | number | รายการขั้นตอนที่ Agent ดำเนินการ |
Example: Web Research Agent
task: Search for the latest news about AI and summarize the top 3 stories
tools: ["http.request", "data.json_parse"]
model: gpt-4oExample: Data Processing Agent
task: Read the CSV file, filter rows where status is "active", and count them
tools: ["file.read", "data.csv_parse", "array.filter"]
model: gpt-4o