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'
);