Struct apiai::structure::ApiResult [] [src]

pub struct ApiResult {
    pub source: String,
    pub resolved_query: String,
    pub action: String,
    pub action_incomplete: bool,
    pub parameters: HashMap<String, String>,
    pub contexts: Vec<ApiContext>,
    pub metadata: ApiMetadata,
    pub fulfillment: ApiFulfillment,
    pub score: f32,
}

Result object encapsulates API result including actions, intent name (if applicable) etc.

Fields

Source of the answer. Could be "agent" if the response was retrieved from the agent.

The query that was used to produce this result.

An action to take. Example: turn on

true if the triggered intent has required parameters and not all the required parameter values have been collected false if all required parameter values have been collected or if the triggered intent doesn't containt any required parameters.

A map of parameters associated with this result

Vector of contexts provided by the current conversation

Metadata from api.ai

Metadata from api.ai

Matching score for the intent. (Between 1 and 0)