OpenAITranslate Data Connector

OpenAITranslate() → {object}

The OpenAI Translate Data Connector extends the functionality of the OpenAI Data Connector. It provides functionality for translating text.

Returns:
object

the OpenAI Translate Data Connector.

Functions

translate(prompt, language, modelopt) → {string}

Translates the prompt into the specified language.

Parameters:
Name Type Attributes Description
prompt string  

The text to translate.

language string  

The language to translate into.

model string <optional>

The ID of the model to use. Uses the default if not specified.

Returns:
string

The translated text.

Example:
// Translate some text into German
connectors.verjio.openai.translate(
  'In a hole in the ground there lived a rabbit.',
  'german'
);
Copyright Ebase Technology 2024