Actions2
Overview
This node integrates with a language model service to generate text completions or process videos based on user input. It supports multiple large language models (LLMs) and offers configurable parameters to control the generation behavior and safety settings.
Use cases include:
- Generating creative or informative text responses from prompts.
- Processing video URLs for analysis or transformation (though this operation is less detailed here).
- Applying safety filters to block hate speech, harassment, sexual content, or dangerous content in generated text.
Practical examples:
- Automatically generating product descriptions or marketing copy from brief prompts.
- Creating chatbot replies tailored by temperature and token limits.
- Filtering out unsafe or inappropriate content in AI-generated text using adjustable safety blocks.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Generate Text" or "Process Video". |
| Video URL | URL of the video to be processed (only shown if Operation is "Process Video"). |
| Model Type | Select the LLM model to use. Options include Gemini variants, Gemma, Llama 3.1 variants, Mistral, Mixtral, WizardLM, etc. |
| Prompt | The text prompt you want the language model to respond to. |
| Temperature | Controls randomness in response generation; higher values produce more diverse outputs. |
| Max Tokens | Maximum length (in tokens) of the generated response. |
| Top P | Nucleus sampling parameter controlling the breadth of token selection (probability mass). |
| Top K | Limits token selection to top K candidates during generation. |
| Safety Settings : Hate Block | Level of filtering for hate speech content: None, Low, Medium, High (only for certain Gemini models). |
| Safety Settings : Harassment Block | Level of filtering for harassment content: None, Low, Medium, High (only for certain Gemini models). |
| Safety Settings : Sexual Block | Level of filtering for sexual content: None, Low, Medium, High (only for certain Gemini models). |
| Safety Settings : Dangerous Content Block | Level of filtering for dangerous content: None, Low, Medium, High (only for certain Gemini models). |
Output
The node outputs JSON data containing the response from the external API:
- For Generate Text operation, the output JSON contains the language model's generated text or an error message if the request failed.
- For Process Video operation, the output JSON contains the API response related to video processing or an error message.
No binary data output is indicated.
Example output structure for text generation:
{
"json": {
"generated_text": "...",
"other_response_fields": "..."
}
}
If an error occurs and "Continue On Fail" is enabled, the output includes an error message linked to the specific item index.
Dependencies
- Requires an API key credential for authentication with the external LLM/video processing service.
- The node makes HTTP POST requests to endpoints under the configured domain:
/llmsfor text generation./process-videofor video processing.
- The API key and domain must be set up in n8n credentials before use.
Troubleshooting
No credentials returned!
This error indicates missing or misconfigured API credentials. Ensure the API key credential is properly set up and assigned to the node.API request failures:
Network issues, invalid API keys, or incorrect domain configuration can cause request errors. Check connectivity and credential validity.Unsupported model or operation:
Selecting a model or operation not supported by the API may result in errors. Verify that the chosen model and operation are valid.Safety filter misconfiguration:
Safety settings apply only to certain Gemini models. Using them with unsupported models has no effect and might confuse users.Enable "Continue On Fail" cautiously to handle partial failures gracefully.
Links and References
- No direct links provided in the source code.
- Refer to your LLM service provider's official API documentation for details on model capabilities, parameters, and safety features.
- n8n documentation on creating and configuring custom nodes and credentials: https://docs.n8n.io/
This summary is based solely on static analysis of the provided source code and property definitions.
