Unitalk AI icon

Unitalk AI

Consume Open AI

Actions5

Text → Complete

AI-generated

Summary

Generates text completions using the Unitalk AI API endpoint /v1/completions.

Inputs

  • model (required) — The model to use for text generation. Options are dynamically loaded from the API.
  • prompt (required) — The text input to generate completion(s) for.
  • simplifyOutput — If true (default), returns a simplified data object containing the choices; if false, returns the raw API response.
  • frequency_penalty — Penalizes tokens based on frequency; range -2 to 2.
  • maxTokens — Maximum tokens to generate; default 16, max 32,768.
  • n — Number of completions to generate per prompt.
  • presence_penalty — Penalizes tokens based on presence; range -2 to 2.
  • temperature — Controls randomness; range 0 to 1.
  • topP — Controls diversity via nucleus sampling; range 0 to 1.
  • echo — Whether to include the prompt in the response.

Output shape

One item per input item (or per prompt if batching is used), with the text completion in a 'text' field if simplified, otherwise a raw data object.

By default, the operation returns a simplified data object. If simplifiedOutput is disabled, the raw API response is returned. Batching is available in the Request Options settings.

Examples

Example 1: Generate a short completion from a single prompt.

Set Model and Prompt. Ensure Simplify Output is enabled (default).

Example 2: Generate multiple variations of a response.

Set Model and Prompt. Set Number of Completions to 3 and Temperature to 0.7.

Example 3: Generate completion without simplification.

Set Model and Prompt. Set Simplify Output to false.

Links

Discussion