LLM_TRANSLATE
Description
Used to translate text into a specified language.
Syntax
LLM_TRANSLATE([<resource_name>], <text>, <target_language>)
Parameters
Parameter | Description |
---|---|
<resource_name> | The specified resource name |
<text> | The text to translate |
<target_language> | The target language |
Return Value
Returns the translated text string.
If any input is NULL, returns NULL.
The result is generated by a large language model, so the output may vary.
Examples
SET default_llm_resource = 'resourse_name';
SELECT LLM_TRANSLATE('In my mind, doris is the best databases management system.', 'zh-CN') AS Result;
+----------------------------------------------------------------+
| Result |
+----------------------------------------------------------------+
| 在我心目中,Doris是最优秀的数据库管理系统。 |
+----------------------------------------------------------------+
SELECT LLM_Translate('resource_name', 'This is an example', 'French') AS Result;
+------------------+
| Result |
+------------------+
| Voici un exemple |
+------------------+