Struct apiai::structure::ApiRequest [] [src]

pub struct ApiRequest {
    pub query: Option<String>,
    pub event: Option<ApiEvent>,
    pub session_id: String,
    pub lang: Language,
    pub contexts: Vec<ApiContext>,
}

ApiRequest is a structure that encapsulates an api.ai request object

Fields

queryis a simple string that holds the query payload for api.ai requests.

The api.ai documentation defines a query as the natural language to be processed that may be up to 256 characters in length.

Trait Implementations

impl Default for ApiRequest
[src]

Default for ApiRequest automatically generates a sessionId if one is not provided.

Returns the "default value" for a type. Read more