SL LLMs icon

SL LLMs

StrangeLogic LLM Node

Overview

This node integrates with an external 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 a prompt using various advanced 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.

Practical examples:

  • Generating creative writing, code snippets, or answers to questions by providing a prompt.
  • Processing a video URL to analyze or extract information guided by a prompt.

Properties

Name Meaning
Operation Choose between "Generate Text" (text generation) or "Process Video" (video analysis).
Model Type Select the AI model to use for generation. Options include Gemini variants, Llama 3.1, Mistral, etc.
Prompt The input text prompt that the LLM will respond to or guide video processing.
Temperature Controls randomness in text generation; higher values produce more diverse outputs (0 to 1 scale).
Max Tokens Maximum length of the generated response in tokens.
Top P Nucleus sampling parameter controlling token selection breadth (0 to 1).
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 AI service:

  • For Generate Text operation:
    The JSON contains the generated text completion or response from the selected LLM model.

  • For Process Video operation:
    The JSON contains the result of processing the provided video URL with the given prompt, as returned by the external API.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the external AI service.
  • The node makes HTTP POST requests to the service domain specified in the credentials.
  • The external service must support endpoints /llms for text generation and /process-video for video processing.
  • Network connectivity to the external API endpoint is required.

Troubleshooting

  • No credentials returned!
    This error occurs if the node cannot find the required API authentication credentials. Ensure that valid credentials are configured in n8n before running the node.

  • API request failures (timeouts, network errors, invalid responses)
    These may happen due to network issues, incorrect API keys, or service downtime. Check your internet connection, verify the API key, and confirm the external service status.

  • Continue On Fail behavior
    If enabled, the node will return error details in the output JSON instead of stopping execution on individual item failures.

  • Invalid property values
    Providing unsupported model types or invalid numeric parameters (e.g., negative max tokens) may cause errors. Use only supported options and valid ranges.

Links and References

  • No direct links available from the source code.
  • Refer to the external AI service documentation for detailed API usage and model descriptions.
  • n8n documentation on creating custom nodes and handling credentials.

Discussion