SL LLMs icon

SL LLMs

StrangeLogic LLM Node

Overview

This node integrates with a large language model (LLM) API to generate text completions based on user-provided prompts. It supports multiple advanced LLM models, allowing users to customize generation parameters such as temperature, maximum tokens, and sampling strategies. The node is useful for automating content creation, drafting messages, generating code snippets, or any scenario requiring AI-generated text responses.

For example, you can input a prompt like "Write a summary of climate change impacts" and receive a detailed AI-generated text output. This node also includes safety settings to filter out harmful or inappropriate content when using certain models.

Properties

Name Meaning
Model Type Select the LLM model to use. Options include Gemini variants, Gemma-2-27b, Llama 3.1 series, Mistral, Mixtral, WizardLM, etc.
Prompt The text prompt that the LLM will respond to.
Temperature Controls randomness in the generated text; higher values produce more diverse outputs (default 0.7).
Max Tokens Maximum length (in tokens) of the generated response (default 2048).
Top P Nucleus sampling parameter controlling token selection breadth (default 1).
Top K Limits token selection to top K candidates (default 2).
Safety Settings: Hate Block Level of filtering for hate speech content: None, Low, Medium, High (only for some Gemini models).
Safety Settings: Harassment Block Level of filtering for harassment content: None, Low, Medium, High (only for some Gemini models).
Safety Settings: Sexual Block Level of filtering for sexual content: None, Low, Medium, High (only for some Gemini models).
Safety Settings: Dangerous Content Block Level of filtering for dangerous content: None, Low, Medium, High (only for some Gemini models).

Output

The node outputs JSON data containing the response from the LLM API. The main field is:

  • json: An object representing the API response, typically including the generated text completion.

If an error occurs during the request, the output JSON will contain an error field describing the issue.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the external LLM service.
  • The node sends HTTP POST requests to the configured API domain's /llms endpoint.
  • Proper network access and valid credentials are necessary for successful operation.

Troubleshooting

  • No credentials returned!: Indicates missing or misconfigured API authentication. Ensure the API key credential is set up correctly.
  • API request errors: Network issues, invalid parameters, or server errors may cause failures. Check the error message in the output JSON for details.
  • Timeouts on video operation: The video processing operation currently only waits for a fixed 90-second timer and returns a completion status. This might not reflect actual video processing results.
  • Unsupported model or operation: Selecting incompatible models or operations may lead to unexpected behavior. Verify supported options in the properties.

Links and References

  • No direct external links provided in the source code. For more information, consult the documentation of the LLM API service used with this node.

Discussion