TranslationTextOutput interface

Translation result

Properties

instructionTokens

An integer indicating the number of tokens used in generating the translated text

language

A string representing the language code of the target language.

responseTokens

An integer indicating the number of tokens used in the translation response

sourceCharacters

An integer indicating the number of characters in the source text string

sourceTokens

An integer indicating the number of tokens used in the source sentence

targetTokens

An integer indicating the number of tokens used in the target sentence

text

A string giving the translated text.

Property Details

instructionTokens

An integer indicating the number of tokens used in generating the translated text

instructionTokens?: number

Property Value

number

language

A string representing the language code of the target language.

language: string

Property Value

string

responseTokens

An integer indicating the number of tokens used in the translation response

responseTokens?: number

Property Value

number

sourceCharacters

An integer indicating the number of characters in the source text string

sourceCharacters?: number

Property Value

number

sourceTokens

An integer indicating the number of tokens used in the source sentence

sourceTokens?: number

Property Value

number

targetTokens

An integer indicating the number of tokens used in the target sentence

targetTokens?: number

Property Value

number

text

A string giving the translated text.

text: string

Property Value

string