Actions2
Overview
This node integrates with a Large Language Model (LLM) service to generate text completions or process videos based on user input. The primary use case is generating natural language responses from prompts using various AI models, which can be useful for content creation, chatbots, summarization, or any scenario requiring AI-generated text. Additionally, it supports video processing by sending a video URL and prompt to the service.
For example, you could use this node to:
- Generate creative writing or code snippets from a prompt.
- Create conversational AI responses dynamically.
- Analyze or extract information from a video by providing its URL and a related prompt.
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 AI model to use for generation. Options include Gemini variants, Llama models, Mistral, WizardLM, etc. |
| Prompt | The text prompt that the LLM will respond to. |
| Temperature | Controls randomness in response generation; higher values produce more diverse outputs. |
| Max Tokens | Maximum length of the generated response in tokens. |
| Top P | Nucleus sampling parameter controlling token selection breadth. |
| Top K | Limits token selection to top K candidates. |
| 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 service:
- For Generate Text operation, the output JSON contains the 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 produced by this node.
Example output structure for text generation:
{
"json": {
"generated_text": "The AI-generated response here...",
// other metadata fields depending on the API response
}
}
Example output structure for video processing:
{
"json": {
"result": "...",
// other fields returned by the video processing endpoint
}
}
Dependencies
- Requires an API key credential for authentication with the external AI service.
- The node makes HTTP POST requests to the configured domain endpoints
/llmsfor text generation and/process-videofor video processing. - The API domain and key must be set up in the node credentials before execution.
Troubleshooting
- No credentials returned!: This error occurs if the required API key credential is not provided or configured incorrectly. Ensure the API key credential is set up properly.
- HTTP request failures: Network issues, invalid API keys, or incorrect parameters may cause request errors. Check the API key validity, network connectivity, and parameter correctness.
- Timeouts: Requests have a timeout of 120 seconds. If the API is slow or unresponsive, consider retrying or checking the service status.
- Continue On Fail option: If enabled, the node will return error details in the output instead of stopping execution on failure, allowing workflows to handle errors gracefully.
Links and References
- No direct links are provided in the source code. Users should refer to their AI service provider's documentation for detailed API usage and model descriptions.
