translate_text
Translate text to a target language. Local cache provides fast, free repeated translations; API fallback handles new translations automatically.
Instructions
Translate text to a target language. Tries the local translation-memory cache first (instant + free); on miss, calls Groq (preferred) or OpenAI via Windy Word's configured key. The TM cache auto-populates from successful calls so repeat translations are free. Source language defaults to "auto" (model detects); only concrete source-lang calls hit the TM. Returns {ok, translation, fromCache, sourceLang, targetLang, engine}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to translate. | |
| sourceLang | No | Source language code or "auto" (default). | |
| targetLang | Yes | Target language code (e.g. "es", "fr", "ja"). |