WitModernResponse

public struct WitModernResponse : Codable, WitResponseProtocol

The modern version of a wit response.

  • The text that was sent to wit. Example: “Wie komme ich zum schwedenplatz”

    Declaration

    Swift

    public let _text: String
  • Message id generated by wit. Useful when communicating with the wit team about problems. Example: “0j2ApLHDS8AHvzHYx”

    Declaration

    Swift

    public let msg_id: String
  • Non-Wit addition. Array of Action to perform (message to outbut) by the client, if available. Wave answers are currently not outputted here and need to be resolved client-side via outcomes. The wienbot property overrides the outcomes: if wienbot is set, the client should ignore outcomes. Optional. A dictionary of entities found. The key of the dictionary is also the name of the entity. Optional.

    Declaration

    Swift

    public var entities: [String : [WitEntity]]?
  • An array of actions that the app should run. Optional.

    Declaration

    Swift

    public var wienbot: [Action]?
  • Non-Wit addition. Array of QuickReply. Quick replies to be added as quick replies to the answer or to be appended to any quick replies the client may be outputing. For example if the user asks “Wo ist die nächste Bibliothek” (Wave Story), additionalQuickReplies will contain a “Info: Bibilothek” button, that sends “biblothek” and triggers the WienBot story. Optional.

    Declaration

    Swift

    public var additionalQuickReplies: [QuickReply]?
  • Non-Wit addition. If true, ask the user for the current location, then resend the ServerRequest, but add ServerRequest.latitude and ServerRequest.longitude with the user’s current location. Example “Wie komme ich zum Westbahnhof” with ServerRequest.resolvewave set to true. Optional.

    Declaration

    Swift

    public var tryAgainWithLocation: Bool?
  • Convienience access to the intent.

    Declaration

    Swift

    public var intent: String { get }
  • The confidence of wit’s interpretation, from 0.0 (0%) to 1.0 (100%). Optional.

    Declaration

    Swift

    public var confidence: Float { get }