CheapAI icon

CheapAI

Consume Cheap AI

Actions5

Overview

The node "CheapAI" provides text completion capabilities using various AI models. It allows users to generate text completions based on a given prompt, which is useful for tasks such as content generation, drafting messages, brainstorming ideas, or automating replies. This node is particularly beneficial when you want to integrate AI-generated text into workflows without managing the underlying API calls manually.

For example, you can input a prompt like "Write a short poem about spring," and the node will return a creative completion generated by the selected AI model.

Note: This node is marked as deprecated soon, and users are encouraged to migrate to the newer AIConnect node.

Properties

Name Meaning
WARNING A notice that this node will be deprecated soon and suggests updating to AIConnect.
Model The AI model used to generate the completion. Models exclude audio, GPT chat, whisper, and certain other specialized models. Users select from available text completion models.
Prompt The input text prompt for which the AI will generate completions. Example: "Say this is a test".
Simplify 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.
Options (collection) Additional optional parameters to customize the completion behavior:
- Echo Prompt Boolean option 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, reducing repetition.
- Maximum Number of Tokens Maximum tokens to generate in the completion. Most models support up to 2048 tokens; some newer ones support up to 32,768.
- Number of Completions How many completions to generate per prompt. Generating multiple completions consumes more token quota.
- Presence Penalty Number between -2 and 2 that penalizes new tokens based on whether they appear in the text so far, encouraging discussion of new topics.
- Sampling Temperature Controls randomness of completions from 0 (deterministic) to 1 (more random).
- Top P Controls diversity via nucleus sampling, selecting from the top probability mass. Values range from 0 to 1.

Output

The node outputs JSON data representing the AI completion results. If the "Simplify" property 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 "Simplify" is disabled, the node returns the full raw response from the AI service, which may include additional details beyond just the completions.

This node does not output binary data.

Dependencies

  • Requires an API key credential for the Cheap AI service.
  • The base URL for the API is configurable via credentials.
  • The node depends on the external Cheap AI API endpoint /v1/models to load available models dynamically.
  • No other external dependencies are indicated.

Troubleshooting

  • Common issues:

    • Using deprecated node: Since the node is marked for deprecation, users should consider migrating to the recommended AIConnect node to avoid future disruptions.
    • Invalid or missing API credentials: Ensure the API key and base URL are correctly configured in the node credentials.
    • Exceeding token limits: Setting very high values for max tokens or number of completions may cause quota exhaustion or errors.
    • Unsupported model selection: Some models are filtered out and cannot be used; ensure the selected model is valid for text completion.
  • Error messages:

    • HTTP errors from the API (e.g., 401 Unauthorized) usually indicate credential issues.
    • Validation errors if required properties like "Prompt" or "Model" are empty.
    • Rate limit exceeded errors if too many requests are made in a short time.

Resolving these generally involves verifying credentials, adjusting property values, and respecting API usage limits.

Links and References

Discussion