MessageInput

public struct MessageInput : Codable, Equatable

An input object that includes the input text.

  • The type of the message:

    • text: The user input is processed normally by the assistant.
    • search: Only search results are returned. (Any dialog or actions skill is bypassed.) Note: A search message results in an error if no search skill is configured for the assistant.
    See more

    Declaration

    Swift

    public enum MessageType : String
  • The type of the message:

    • text: The user input is processed normally by the assistant.
    • search: Only search results are returned. (Any dialog or actions skill is bypassed.) Note: A search message results in an error if no search skill is configured for the assistant.

    Declaration

    Swift

    public var messageType: String?
  • The text of the user input. This string cannot contain carriage return, newline, or tab characters.

    Declaration

    Swift

    public var text: String?
  • Intents to use when evaluating the user input. Include intents from the previous response to continue using those intents rather than trying to recognize intents in the new input.

    Declaration

    Swift

    public var intents: [RuntimeIntent]?
  • Entities to use when evaluating the message. Include entities from the previous response to continue using those entities rather than detecting entities in the new input.

    Declaration

    Swift

    public var entities: [RuntimeEntity]?
  • For internal use only.

    Declaration

    Swift

    public var suggestionID: String?
  • Optional properties that control how the assistant responds.

    Declaration

    Swift

    public var options: MessageInputOptions?
  • Initialize a MessageInput with member variables.

    Declaration

    Swift

    public init(
        messageType: String? = nil,
        text: String? = nil,
        intents: [RuntimeIntent]? = nil,
        entities: [RuntimeEntity]? = nil,
        suggestionID: String? = nil,
        options: MessageInputOptions? = nil
    )

    Parameters

    messageType

    The type of the message:

    • text: The user input is processed normally by the assistant.
    • search: Only search results are returned. (Any dialog or actions skill is bypassed.) Note: A search message results in an error if no search skill is configured for the assistant.

    text

    The text of the user input. This string cannot contain carriage return, newline, or tab characters.

    intents

    Intents to use when evaluating the user input. Include intents from the previous response to continue using those intents rather than trying to recognize intents in the new input.

    entities

    Entities to use when evaluating the message. Include entities from the previous response to continue using those entities rather than detecting entities in the new input.

    suggestionID

    For internal use only.

    options

    Optional properties that control how the assistant responds.

    Return Value

    An initialized MessageInput.