pub trait RivaLanguageUnderstanding: Send + Sync + 'static {
    // Required methods
    fn classify_text<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TextClassRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<TextClassResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn classify_tokens<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TokenClassRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<TokenClassResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn transform_text<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TextTransformRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<TextTransformResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn analyze_entities<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AnalyzeEntitiesRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<TokenClassResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn analyze_intent<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AnalyzeIntentRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<AnalyzeIntentResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn punctuate_text<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TextTransformRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<TextTransformResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn natural_query<'life0, 'async_trait>(
        &'life0 self,
        request: Request<NaturalQueryRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<NaturalQueryResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_riva_nlp_config<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RivaNlpConfigRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<RivaNlpConfigResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with RivaLanguageUnderstandingServer.

Required Methods§

source

fn classify_text<'life0, 'async_trait>( &'life0 self, request: Request<TextClassRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TextClassResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

ClassifyText takes as input an input/query string and parameters related to the requested model to use to evaluate the text. The service evaluates the text with the requested model, and returns one or more classifications.

source

fn classify_tokens<'life0, 'async_trait>( &'life0 self, request: Request<TokenClassRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TokenClassResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

ClassifyTokens takes as input either a string or list of tokens and parameters related to which model to use. The service evaluates the text with the requested model, performing additional tokenization if necessary, and returns one or more class labels per token.

source

fn transform_text<'life0, 'async_trait>( &'life0 self, request: Request<TextTransformRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TextTransformResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

TransformText takes an input/query string and parameters related to the requested model and returns another string. The behavior of the function is defined entirely by the underlying model and may be used for tasks like translation, adding punctuation, augment the input directly, etc.

source

fn analyze_entities<'life0, 'async_trait>( &'life0 self, request: Request<AnalyzeEntitiesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TokenClassResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

AnalyzeEntities accepts an input string and returns all named entities within the text, as well as a category and likelihood.

source

fn analyze_intent<'life0, 'async_trait>( &'life0 self, request: Request<AnalyzeIntentRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<AnalyzeIntentResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

AnalyzeIntent accepts an input string and returns the most likely intent as well as slots relevant to that intent.

The model requires that a valid “domain” be passed in, and optionally supports including a previous intent classification result to provide context for the model.

source

fn punctuate_text<'life0, 'async_trait>( &'life0 self, request: Request<TextTransformRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<TextTransformResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

PunctuateText takes text with no- or limited- punctuation and returns the same text with corrected punctuation and capitalization.

source

fn natural_query<'life0, 'async_trait>( &'life0 self, request: Request<NaturalQueryRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<NaturalQueryResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

NaturalQuery is a search function that enables querying one or more documents or contexts with a query that is written in natural language.

source

fn get_riva_nlp_config<'life0, 'async_trait>( &'life0 self, request: Request<RivaNlpConfigRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<RivaNlpConfigResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Enables clients to request the configuration of the current ASR service, or a specific model within the service.

Implementors§