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: String
Source of the answer. Could be "agent" if the response was retrieved from the agent.
resolved_query: String
The query that was used to produce this result.
action: String
An action to take. Example: turn on
action_incomplete: bool
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.
parameters: HashMap<String, String>
A map of parameters associated with this result
contexts: Vec<ApiContext>
Vector of contexts provided by the current conversation
metadata: ApiMetadata
Metadata from api.ai
fulfillment: ApiFulfillment
Metadata from api.ai
score: f32
Matching score for the intent. (Between 1 and 0)