MessageInput
public struct MessageInput : Codable, Equatable
An input object that includes the input text.
-
The text of the user input. This string cannot contain carriage return, newline, or tab characters.
Declaration
Swift
public var text: String?
-
Whether to use spelling correction when processing the input. This property overrides the value of the spelling_suggestions property in the workspace settings.
Declaration
Swift
public var spellingSuggestions: Bool?
-
Whether to use autocorrection when processing the input. If spelling correction is used and this property is
false
, any suggested corrections are returned in the suggested_text property of the message response. If this property istrue
, any corrections are automatically applied to the user input, and the original text is returned in the original_text property of the message response. This property overrides the value of the spelling_auto_correct property in the workspace settings.Declaration
Swift
public var spellingAutoCorrect: Bool?
-
Any suggested corrections of the input text. This property is returned only if spelling correction is enabled and autocorrection is disabled.
Declaration
Swift
public var suggestedText: String?
-
The original user input text. This property is returned only if autocorrection is enabled and the user input was corrected.
Declaration
Swift
public var originalText: String?
-
Additional properties associated with this model.
Declaration
Swift
public var additionalProperties: [String : JSON]
-
Initialize a
MessageInput
with member variables.Declaration
Swift
public init( text: String? = nil, spellingSuggestions: Bool? = nil, spellingAutoCorrect: Bool? = nil, additionalProperties: [String: JSON] = [:] )
Parameters
text
The text of the user input. This string cannot contain carriage return, newline, or tab characters.
spellingSuggestions
Whether to use spelling correction when processing the input. This property overrides the value of the spelling_suggestions property in the workspace settings.
spellingAutoCorrect
Whether to use autocorrection when processing the input. If spelling correction is used and this property is
false
, any suggested corrections are returned in the suggested_text property of the message response. If this property istrue
, any corrections are automatically applied to the user input, and the original text is returned in the original_text property of the message response. This property overrides the value of the spelling_auto_correct property in the workspace settings.Return Value
An initialized
MessageInput
. -
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws