SL LLMs icon

SL LLMs

StrangeLogic LLM Node

Overview

This node integrates with a language model service to generate text completions or process videos based on user input. It is designed primarily for natural language generation tasks, such as creating content, answering questions, or generating code snippets by providing a prompt to a large language model (LLM). Additionally, it supports video processing via a URL input.

Common scenarios include:

  • Generating creative or technical text responses from prompts.
  • Automating content creation workflows.
  • Processing and analyzing video content through an external API.

For example, a user can input a prompt like "Explain the theory of relativity" and receive a detailed explanation generated by the selected LLM model.

Properties

Name Meaning
Operation Choose between "Generate Text" or "Process Video".
Model Type Select the LLM model to use for text generation. Options include Gemini variants, Llama models, Mistral, WizardLM, etc.
Prompt The text prompt that the LLM will respond to.
Temperature Controls randomness in text 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 the top K candidates during generation.
Saftey Settings : Hate Block Level of filtering for hate speech content: None, Low, Medium, High. Applies only to certain Gemini models.
Saftey Settings : Harrasment Block Level of filtering for harassment content: None, Low, Medium, High. Applies only to certain Gemini models.
Saftey Settings : Sexual Block Level of filtering for sexual content: None, Low, Medium, High. Applies only to certain Gemini models.
Saftey Settings : Dangerous Content Block Level of filtering for dangerous content: None, Low, Medium, High. Applies only to certain Gemini models.

Note: Safety settings are only applicable when using specific Gemini models and the "Generate Text" operation.

Output

  • For Generate Text operation:
    The output JSON contains the full response from the LLM API call. This typically includes the generated text completion based on the prompt and parameters provided.

  • For Process Video operation:
    The output JSON contains the response from the video processing API endpoint, which may include analysis results or metadata related to the video URL submitted.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authentication with the external AI service.
  • The node makes HTTP POST requests to the configured domain's /llms endpoint for text generation and /process-video endpoint for video processing.
  • Proper configuration of the API domain and credentials in n8n is necessary.

Troubleshooting

  • No credentials returned!
    This error occurs if the required API key credential is missing or not configured properly. Ensure the credential is set up and linked to the node.

  • API request failures
    Network issues, invalid API keys, or incorrect domain URLs can cause request errors. Check connectivity, credential validity, and endpoint correctness.

  • Continue On Fail behavior
    If enabled, the node will return error details in the output JSON instead of stopping execution on failure, allowing workflows to handle errors gracefully.

  • Unsupported operation or model
    Selecting unsupported combinations of operations and models may result in unexpected behavior or no output. Verify compatibility before running.

Links and References

  • No direct external links are embedded in the source code.
  • Users should refer to their AI service provider’s documentation for details on model capabilities, safety settings, and API usage.

Discussion