translate
Converts text between languages, detects the source language, and applies context or custom instructions to adjust tone and output quality.
Instructions
Translate text between languages with support for language detection and context-aware translations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | An array of text blocks to translate. Each block contains a text string and a boolean indicating whether it should be translated. This allows for selective translation where some text blocks can be preserved in their original form while others are translated. | |
| source | No | The source language code (e.g., 'en-EN' for English). If not specified, the system will attempt to detect it automatically. If you have a hint about the source language, you should specify it in the source_hint field. | |
| target | Yes | The target language code (e.g., 'it-IT' for Italian). This specifies the language you want the text translated into. | |
| context | No | Additional context string to improve translation quality (e.g., 'This is a legal document' or 'Im talking with a doctor'). This helps the translation system better understand the domain. | |
| source_hint | No | Used to guide language detection. Specify this when the source language is uncertain to improve detection accuracy. | |
| instructions | No | A list of instructions to adjust the network’s behavior regarding the output (e.g., 'Use a formal tone'). |