Overview
This node is a custom Large Language Model (LLM) node designed to interact with different LLM models dynamically. It allows users to select or specify a model by name or ID and perform operations such as chat interactions. This node is useful for scenarios where users want to integrate AI-driven conversational capabilities or other LLM-based functionalities into their workflows, such as generating text responses or processing natural language inputs.
Use Case Examples
- Using the node to send chat messages to a selected LLM model and receive AI-generated responses.
- Dynamically loading available LLM models from an external API and selecting one for processing user input.
Properties
| Name | Meaning |
|---|---|
| Model Name or ID | Specifies the LLM model to use for the operation. Users can choose from a dynamically loaded list of models or specify a model ID using an expression. |
| Operation | Defines the type of operation to perform with the LLM model, such as 'Chat' for conversational interactions. |
Output
JSON
operation- The operation performed, e.g., 'chat'.modelType- The selected model name or ID used for the operation.error- Error message if the node execution fails and continueOnFail is enabled.
Dependencies
- Requires an API key credential for authentication to access the external LLM models API at https://ai.system.sl/llm-models.
Troubleshooting
- If no credentials are provided or invalid, the node will throw an error 'No credentials returned!'. Ensure the API key credential is correctly configured.
- If the external API response is not an array of models, the node throws 'Invalid response from API: Expected an array of models.' This indicates an issue with the API or network connectivity.
- Errors during model loading are logged and result in a fallback option 'Error Loading Models' being shown in the model selection dropdown.
Links
- n8n Expressions Documentation - Documentation on how to use expressions in n8n to specify dynamic values such as model IDs.