API Reference#
riva/proto/health.proto#
HealthCheckRequest#
Field |
Type |
Label |
Description |
---|---|---|---|
service |
string |
HealthCheckResponse#
Field |
Type |
Label |
Description |
---|---|---|---|
status |
HealthCheckResponse.ServingStatus#
Name |
Number |
Description |
---|---|---|
UNKNOWN |
0 |
|
SERVING |
1 |
|
NOT_SERVING |
2 |
Health#
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
Check |
|||
Watch |
HealthCheckResponse stream |
riva/proto/riva_common.proto#
RequestId#
Specifies the request ID of the request.
Field |
Type |
Label |
Description |
---|---|---|---|
value |
string |
riva/proto/riva_nmt.proto#
AvailableLanguageRequest#
Returns a map of model names to its source and target language pairs. Can specify a specific model name to retrieve only its language pairs.
Field |
Type |
Label |
Description |
---|---|---|---|
model |
string |
Supported values: “s2s_model”, “s2t_model”, and name of the deployed t2t model. If empty, returns all available models and languages. |
AvailableLanguageResponse#
Language pairs are the sets of src to tgt languages available per model. languages contains all the model_name -> Language pair
Field |
Type |
Label |
Description |
---|---|---|---|
languages |
repeated |
AvailableLanguageResponse.LanguagePair#
Field |
Type |
Label |
Description |
---|---|---|---|
src_lang |
string |
repeated |
|
tgt_lang |
string |
repeated |
AvailableLanguageResponse.LanguagesEntry#
Field |
Type |
Label |
Description |
---|---|---|---|
key |
string |
||
value |
TranslateTextRequest#
request for synchronous translation of each text in texts. Available languages can be queried using ListSupportLanguagePairs RPC. source and target languages must be specified, are currently two character ISO codes, this will likely change to BCP-47 inline with other Riva Services for GA.
Field |
Type |
Label |
Description |
---|---|---|---|
texts |
string |
repeated |
|
model |
string |
||
source_language |
string |
||
target_language |
string |
||
dnt_phrases |
string |
repeated |
A list of words or phrases that are not to be translated or to be custom translated by the pipeline. Words to be custom translated should be specified as “<word>##<custom_translation>” and words not be translated should be specified as “<word>”. |
id |
The ID to be associated with the request. If provided, this will be returned in the corresponding response. |
TranslateTextResponse#
Translations are returned as text:language pairs. These are 1:1 for the passed in ‘texts’ from the request.
Field |
Type |
Label |
Description |
---|---|---|---|
translations |
repeated |
||
id |
The ID associated with the request |
Translation#
contains a single translation, collecting into the translate text response Includes the target language code, since with multi lingual models there are multiple possibilities.
Field |
Type |
Label |
Description |
---|---|---|---|
text |
string |
||
language |
string |
TranslationConfig#
Field |
Type |
Label |
Description |
---|---|---|---|
source_language_code |
string |
BCP-47 “en-US” |
|
target_language_code |
string |
||
model_name |
string |
||
dnt_phrases |
string |
repeated |
A list of words or phrases that will not be translated by the pipeline. This list can include special words or phrases, for example, names, acronyms or any phrases desired to be excluded from translation. These words or phrases will be present as-is in the translated output. |
RivaTranslation#
RivaTranslation service provides rpcs to translate between languages.
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
TranslateText |
Translate text to text, from a source to a target language. Currently source and target language fields is required, along with the model name. Multiple texts may be passed per request up to the given batch size for the model, which is set at translation pipeline creation time. |
||
ListSupportedLanguagePairs |
Lists the available language pairs and models names to be used for TranslateText |
Scalar Value Types#
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
---|---|---|---|---|---|---|---|---|
double |
double |
double |
float |
float64 |
double |
float |
Float |
|
float |
float |
float |
float |
float32 |
float |
float |
Float |
|
int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
bool |
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
|
string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |