Straico Official icon

Straico Official

Get data from Straico API

Prompt → Completion

AI-generated

Overview

This node performs text completion using the Straico API's prompt completion endpoint. It allows users to generate text completions by providing a message and selecting one or more language models or using a smart LLM selector to automatically choose models based on quantity and pricing strategy. Additional options include specifying file URLs, images, YouTube URLs for context, controlling output length, temperature for creativity, and whether to simplify the response.

Use Case Examples

  1. Generating a text completion for a user query using a specific model like GPT-4.
  2. Using the smart LLM selector to automatically pick the best model based on budget or quality for generating marketing copy.
  3. Providing URLs of documents or images to enrich the context for the completion request.

Properties

Name Meaning
Model Names or IDs Select one or more models for text completion or leave empty to use the smart LLM selector.
Message The input text message to generate a completion for.
Smart LLM Selector Collection of options to configure automatic model selection, including quantity (1-4) and pricing method (quality, balance, budget).
Additional Fields Optional parameters to customize the completion request, such as display transcripts, file URLs, images, max tokens, replace failed models, temperature, and YouTube URLs.
Simplify Whether to return a simplified version of the response instead of the raw data.

Output

JSON

  • id - Unique identifier of the completion response.
  • message - The generated completion message text.
  • model - The model used to generate the completion.
  • usage - Token usage statistics for the completion.
  • created_at - Timestamp when the completion was created.

Dependencies

  • Straico API key credential

Troubleshooting

  • Error if neither models nor smart LLM selector is provided: The node requires either specific models or a smart LLM selector to be set for completion.
  • Error if both models and smart LLM selector are provided: Only one of these options can be used at a time to avoid conflicts.
  • Error if no binary data found for file uploads when required: Ensure the binary property name matches the input data.
  • Invalid format errors for previous messages in chat completions: Check the input format and JSON structure for messages.

Discussion