Basic LLM Chain
ai.chain_llm · version 1.7 · AI
Sends a prompt to a chat model and returns its answer.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | |||
| input 1 | ai_languageModel | yes | 1 | |
| input 2 | ai_outputParser | 1 | ||
| output 0 | main |
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
promptType | options | "auto" | Prompt Source. One of auto, define. | ||
text | string | promptType = define | Prompt. | ||
hasOutputParser | boolean | false | Require Specific Output Format. | ||
messages | fixed_collection | Chat Messages. | |||
messages.messageValues | collection | Message. | |||
messages.messageValues.type | options | "SystemMessagePromptTemplate" | Role. One of SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate. | ||
messages.messageValues.messageType | options | "text" | Content Type. One of text, imageBinary, imageUrl. | ||
messages.messageValues.message | string | ||||
messages.messageValues.binaryImageDataKey | string | "data" | Binary Field. | ||
messages.messageValues.imageUrl | string | Image URL. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
@n8n/n8n-nodes-langchain.chainLlm | 1 | unverified |