Actions2
Overview
This node integrates with various large language models (LLMs) to generate text responses based on user prompts or to process videos via an external service. The primary use case is generating natural language text completions or answers from a prompt using different AI models, which can be useful for content creation, chatbots, summarization, or any scenario requiring AI-generated text. Additionally, it supports a video processing operation that sends a video URL and prompt to a remote API for analysis or processing.
Practical examples:
- Generating creative writing, code snippets, or explanations by providing a prompt.
- Filtering generated content with configurable safety settings to block hate speech, harassment, sexual content, or dangerous content.
- Processing a video URL to extract insights or perform transformations through the external video processing endpoint.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Generate Text" or "Process Video" operations. |
| Video URL | URL of the video to be processed (only shown when Operation is "Process Video"). |
| Model Type | Selects the AI model to use for text generation. Options include Gemini variants, Llama versions, Mistral, Mixtral, WizardLM, etc. |
| Prompt | The input prompt string that the LLM will respond to. |
| Temperature | Controls randomness in text generation; higher values produce more random outputs (default 0.7). |
| Max Tokens | Maximum length of the generated response in tokens (default 2048). |
| Top P | Nucleus sampling parameter controlling token selection breadth (default 1). |
| Top K | Limits token selection to top K choices (default 2). |
| 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 AI model or the video processing service.
- For Generate Text operation, the output JSON contains the generated text or error information if the request fails.
- For Process Video operation, the output JSON contains the result returned by the external video processing API or error details.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authentication with the AI service.
- For video processing, it calls an external HTTP endpoint (
https://k8fm9r7b-8000.uks1.devtunnels.ms/process-video). - For text generation, it sends requests to a domain specified in the credentials.
- The node expects the API key and domain to be configured properly in n8n credentials.
Troubleshooting
- No credentials returned!: This error occurs if the required API key credential is missing or not configured correctly. Ensure the API key credential is set up in n8n.
- HTTP request errors: Network issues, invalid API keys, or incorrect domain URLs can cause request failures. Check connectivity and credential correctness.
- Operation mismatch: Providing parameters for one operation while selecting another may cause unexpected behavior. Verify that properties correspond to the selected operation.
- Safety settings only apply to certain models: Using safety filters with unsupported models will have no effect; ensure you select compatible models when enabling these options.
- If
continueOnFailis enabled, errors during requests will be returned as part of the output JSON instead of stopping execution.
Links and References
- No direct external documentation links are embedded in the source code.
- Users should refer to their AI service provider's API documentation for details on model capabilities and parameters.
- For video processing, consult the external API provider if available.
