CheapAI icon

CheapAI

Consume Cheap AI

Actions5

Overview

The node provides an interface to generate AI completions using various supported language models. Specifically, for the Chat resource with the Complete operation, it sends a series of messages (a chat prompt) to an AI model and receives generated completions in response. This is useful for scenarios such as conversational agents, automated content generation, summarization, or any task requiring natural language understanding and generation.

Practical examples include:

  • Building a chatbot that responds to user queries.
  • Generating creative writing or code snippets based on prompts.
  • Summarizing or expanding text content interactively.

Properties

Name Meaning
Model The AI model used to generate the completion. Options include models starting with prefixes like gpt-, llama, codellama, airoboros, mistral, palm, claude, qwen, starchat, and cohere.
Prompt A collection of messages forming the chat prompt. Each message has a role (assistant, system, or user) and content (text). Multiple messages can be added to form a conversation history.
Simplify Boolean flag indicating whether to return a simplified version of the response containing only the relevant completion data instead of the full raw API response. Defaults to true.
Echo Prompt Whether to include the original prompt in the output along with the completion.
Frequency Penalty Number between -2 and 2 that penalizes new tokens based on their existing frequency in the text so far, reducing repetition.
Maximum Number of Tokens The maximum number of tokens to generate in the completion. Most models support up to 2048 tokens, newer ones up to 32,768.
Number of Completions How many completions to generate per prompt. Higher values consume more tokens and quota.
Presence Penalty Number between -2 and 2 that penalizes new tokens based on whether they appear in the text so far, encouraging the model to talk about new topics.
Sampling Temperature Controls randomness of completions from 0 (deterministic) to 1 (more random).
Top P Controls diversity via nucleus sampling; value between 0 and 1 indicating the cumulative probability threshold for token selection.

Output

The node outputs JSON data representing the AI completion results. If the "Simplify" option is enabled (default), the output contains a data field with an array of completion choices returned by the AI model. Each choice typically includes the generated text and related metadata.

If binary data were involved (not applicable here), it would be summarized accordingly, but this node focuses on textual completions.

Dependencies

  • Requires an API key credential for accessing the Cheap AI service.
  • The base URL for the API is configurable via credentials.
  • The node depends on external AI models accessible through the configured API endpoint.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Selecting unsupported or unavailable models may result in errors or empty responses.
    • Exceeding token limits (max tokens or prompt length) can cause request rejections.
    • Setting too high a number of completions (n) may quickly exhaust token quota.
  • Error messages:

    • Authentication errors: Verify API key and endpoint configuration.
    • Model not found or invalid: Choose a valid model from the provided options.
    • Rate limit exceeded: Reduce request frequency or contact service provider.
    • Payload too large: Reduce prompt size or max tokens.

Links and References


Note: This node is marked as deprecated and users are encouraged to migrate to the recommended AIConnect node for continued support and features.

Discussion