@@ -98,8 +98,9 @@ There are additional optional arguments to control translation, see
9898` translateText() ` returns a ` TextResult ` , or a List of ` TextResult ` s
9999corresponding to your input text(s). ` TextResult ` has the following accessors:
100100- ` getText() ` returns the translated text,
101- - ` getDetectedSourceLanguage() ` returns the detected source language code, and
102- - ` getBilledCharacters() ` returns the number of characters billed for the text.
101+ - ` getDetectedSourceLanguage() ` returns the detected source language code,
102+ - ` getBilledCharacters() ` returns the number of characters billed for the text, and
103+ - ` getModelTypeUsed() ` returns the model type used for the translation.
103104
104105``` java
105106class Example { // Continuing class Example from above
@@ -166,6 +167,13 @@ a `TextTranslationOptions`, with the following setters:
166167 translated itself. Characters in the ` context ` parameter are not counted toward billing.
167168 See the [ API documentation] [ api-docs-context-param ] for more information and
168169 example usage.
170+ - ` model_type ` : specifies the type of translation model to use, options are:
171+ - ` 'quality_optimized' ` : use a translation model that maximizes translation quality,
172+ at the cost of response time. This option may be unavailable for some language pairs.
173+ - ` 'prefer_quality_optimized' ` : use the highest-quality translation model for the given
174+ language pair.
175+ - ` 'latency_optimized' ` : use a translation model that minimizes response time, at the
176+ cost of translation quality.
169177- ` setTagHandling() ` : type of tags to parse before translation, options are
170178 ` "html" ` and ` "xml" ` .
171179
0 commit comments