@@ -7275,17 +7275,61 @@ class MessageInput():
7275
7275
7276
7276
:attr str text: (optional) The text of the user input. This string cannot
7277
7277
contain carriage return, newline, or tab characters.
7278
+ :attr bool spelling_suggestions: (optional) Whether to use spelling correction
7279
+ when processing the input. This property overrides the value of the
7280
+ **spelling_suggestions** property in the workspace settings.
7281
+ :attr bool spelling_auto_correct: (optional) Whether to use autocorrection when
7282
+ processing the input. If spelling correction is used and this property is
7283
+ `false`, any suggested corrections are returned in the **suggested_text**
7284
+ property of the message response. If this property is `true`, any corrections
7285
+ are automatically applied to the user input, and the original text is returned
7286
+ in the **original_text** property of the message response. This property
7287
+ overrides the value of the **spelling_auto_correct** property in the workspace
7288
+ settings.
7289
+ :attr str suggested_text: (optional) Any suggested corrections of the input
7290
+ text. This property is returned only if spelling correction is enabled and
7291
+ autocorrection is disabled.
7292
+ :attr str original_text: (optional) The original user input text. This property
7293
+ is returned only if autocorrection is enabled and the user input was corrected.
7278
7294
"""
7279
7295
7280
- def __init__ (self , * , text : str = None , ** kwargs ) -> None :
7296
+ def __init__ (self ,
7297
+ * ,
7298
+ text : str = None ,
7299
+ spelling_suggestions : bool = None ,
7300
+ spelling_auto_correct : bool = None ,
7301
+ suggested_text : str = None ,
7302
+ original_text : str = None ,
7303
+ ** kwargs ) -> None :
7281
7304
"""
7282
7305
Initialize a MessageInput object.
7283
7306
7284
7307
:param str text: (optional) The text of the user input. This string cannot
7285
7308
contain carriage return, newline, or tab characters.
7309
+ :param bool spelling_suggestions: (optional) Whether to use spelling
7310
+ correction when processing the input. This property overrides the value of
7311
+ the **spelling_suggestions** property in the workspace settings.
7312
+ :param bool spelling_auto_correct: (optional) Whether to use autocorrection
7313
+ when processing the input. If spelling correction is used and this property
7314
+ is `false`, any suggested corrections are returned in the
7315
+ **suggested_text** property of the message response. If this property is
7316
+ `true`, any corrections are automatically applied to the user input, and
7317
+ the original text is returned in the **original_text** property of the
7318
+ message response. This property overrides the value of the
7319
+ **spelling_auto_correct** property in the workspace settings.
7320
+ :param str suggested_text: (optional) Any suggested corrections of the
7321
+ input text. This property is returned only if spelling correction is
7322
+ enabled and autocorrection is disabled.
7323
+ :param str original_text: (optional) The original user input text. This
7324
+ property is returned only if autocorrection is enabled and the user input
7325
+ was corrected.
7286
7326
:param **kwargs: (optional) Any additional properties.
7287
7327
"""
7288
7328
self .text = text
7329
+ self .spelling_suggestions = spelling_suggestions
7330
+ self .spelling_auto_correct = spelling_auto_correct
7331
+ self .suggested_text = suggested_text
7332
+ self .original_text = original_text
7289
7333
for _key , _value in kwargs .items ():
7290
7334
setattr (self , _key , _value )
7291
7335
@@ -7297,6 +7341,18 @@ def from_dict(cls, _dict: Dict) -> 'MessageInput':
7297
7341
if 'text' in _dict :
7298
7342
args ['text' ] = _dict .get ('text' )
7299
7343
del xtra ['text' ]
7344
+ if 'spelling_suggestions' in _dict :
7345
+ args ['spelling_suggestions' ] = _dict .get ('spelling_suggestions' )
7346
+ del xtra ['spelling_suggestions' ]
7347
+ if 'spelling_auto_correct' in _dict :
7348
+ args ['spelling_auto_correct' ] = _dict .get ('spelling_auto_correct' )
7349
+ del xtra ['spelling_auto_correct' ]
7350
+ if 'suggested_text' in _dict :
7351
+ args ['suggested_text' ] = _dict .get ('suggested_text' )
7352
+ del xtra ['suggested_text' ]
7353
+ if 'original_text' in _dict :
7354
+ args ['original_text' ] = _dict .get ('original_text' )
7355
+ del xtra ['original_text' ]
7300
7356
args .update (xtra )
7301
7357
return cls (** args )
7302
7358
@@ -7310,6 +7366,16 @@ def to_dict(self) -> Dict:
7310
7366
_dict = {}
7311
7367
if hasattr (self , 'text' ) and self .text is not None :
7312
7368
_dict ['text' ] = self .text
7369
+ if hasattr (self , 'spelling_suggestions'
7370
+ ) and self .spelling_suggestions is not None :
7371
+ _dict ['spelling_suggestions' ] = self .spelling_suggestions
7372
+ if hasattr (self , 'spelling_auto_correct'
7373
+ ) and self .spelling_auto_correct is not None :
7374
+ _dict ['spelling_auto_correct' ] = self .spelling_auto_correct
7375
+ if hasattr (self , 'suggested_text' ) and self .suggested_text is not None :
7376
+ _dict ['suggested_text' ] = self .suggested_text
7377
+ if hasattr (self , 'original_text' ) and self .original_text is not None :
7378
+ _dict ['original_text' ] = self .original_text
7313
7379
if hasattr (self , '_additionalProperties' ):
7314
7380
for _key in self ._additionalProperties :
7315
7381
_value = getattr (self , _key , None )
@@ -7322,7 +7388,10 @@ def _to_dict(self):
7322
7388
return self .to_dict ()
7323
7389
7324
7390
def __setattr__ (self , name : str , value : object ) -> None :
7325
- properties = {'text' }
7391
+ properties = {
7392
+ 'text' , 'spelling_suggestions' , 'spelling_auto_correct' ,
7393
+ 'suggested_text' , 'original_text'
7394
+ }
7326
7395
if not hasattr (self , '_additionalProperties' ):
7327
7396
super (MessageInput , self ).__setattr__ ('_additionalProperties' ,
7328
7397
set ())
@@ -9872,6 +9941,14 @@ class WorkspaceSystemSettings():
9872
9941
settings related to the disambiguation feature.
9873
9942
**Note:** This feature is available only to Plus and Premium users.
9874
9943
:attr dict human_agent_assist: (optional) For internal use only.
9944
+ :attr bool spelling_suggestions: (optional) Whether spelling correction is
9945
+ enabled for the workspace.
9946
+ :attr bool spelling_auto_correct: (optional) Whether autocorrection is enabled
9947
+ for the workspace. If spelling correction is enabled and this property is
9948
+ `false`, any suggested corrections are returned in the **suggested_text**
9949
+ property of the message response. If this property is `true`, any corrections
9950
+ are automatically applied to the user input, and the original text is returned
9951
+ in the **original_text** property of the message response.
9875
9952
:attr WorkspaceSystemSettingsSystemEntities system_entities: (optional)
9876
9953
Workspace settings related to the behavior of system entities.
9877
9954
:attr WorkspaceSystemSettingsOffTopic off_topic: (optional) Workspace settings
@@ -9884,6 +9961,8 @@ def __init__(
9884
9961
tooling : 'WorkspaceSystemSettingsTooling' = None ,
9885
9962
disambiguation : 'WorkspaceSystemSettingsDisambiguation' = None ,
9886
9963
human_agent_assist : dict = None ,
9964
+ spelling_suggestions : bool = None ,
9965
+ spelling_auto_correct : bool = None ,
9887
9966
system_entities : 'WorkspaceSystemSettingsSystemEntities' = None ,
9888
9967
off_topic : 'WorkspaceSystemSettingsOffTopic' = None ) -> None :
9889
9968
"""
@@ -9895,6 +9974,15 @@ def __init__(
9895
9974
Workspace settings related to the disambiguation feature.
9896
9975
**Note:** This feature is available only to Plus and Premium users.
9897
9976
:param dict human_agent_assist: (optional) For internal use only.
9977
+ :param bool spelling_suggestions: (optional) Whether spelling correction is
9978
+ enabled for the workspace.
9979
+ :param bool spelling_auto_correct: (optional) Whether autocorrection is
9980
+ enabled for the workspace. If spelling correction is enabled and this
9981
+ property is `false`, any suggested corrections are returned in the
9982
+ **suggested_text** property of the message response. If this property is
9983
+ `true`, any corrections are automatically applied to the user input, and
9984
+ the original text is returned in the **original_text** property of the
9985
+ message response.
9898
9986
:param WorkspaceSystemSettingsSystemEntities system_entities: (optional)
9899
9987
Workspace settings related to the behavior of system entities.
9900
9988
:param WorkspaceSystemSettingsOffTopic off_topic: (optional) Workspace
@@ -9903,6 +9991,8 @@ def __init__(
9903
9991
self .tooling = tooling
9904
9992
self .disambiguation = disambiguation
9905
9993
self .human_agent_assist = human_agent_assist
9994
+ self .spelling_suggestions = spelling_suggestions
9995
+ self .spelling_auto_correct = spelling_auto_correct
9906
9996
self .system_entities = system_entities
9907
9997
self .off_topic = off_topic
9908
9998
@@ -9912,7 +10002,8 @@ def from_dict(cls, _dict: Dict) -> 'WorkspaceSystemSettings':
9912
10002
args = {}
9913
10003
valid_keys = [
9914
10004
'tooling' , 'disambiguation' , 'human_agent_assist' ,
9915
- 'system_entities' , 'off_topic'
10005
+ 'spelling_suggestions' , 'spelling_auto_correct' , 'system_entities' ,
10006
+ 'off_topic'
9916
10007
]
9917
10008
bad_keys = set (_dict .keys ()) - set (valid_keys )
9918
10009
if bad_keys :
@@ -9928,6 +10019,10 @@ def from_dict(cls, _dict: Dict) -> 'WorkspaceSystemSettings':
9928
10019
_dict .get ('disambiguation' ))
9929
10020
if 'human_agent_assist' in _dict :
9930
10021
args ['human_agent_assist' ] = _dict .get ('human_agent_assist' )
10022
+ if 'spelling_suggestions' in _dict :
10023
+ args ['spelling_suggestions' ] = _dict .get ('spelling_suggestions' )
10024
+ if 'spelling_auto_correct' in _dict :
10025
+ args ['spelling_auto_correct' ] = _dict .get ('spelling_auto_correct' )
9931
10026
if 'system_entities' in _dict :
9932
10027
args [
9933
10028
'system_entities' ] = WorkspaceSystemSettingsSystemEntities ._from_dict (
@@ -9953,6 +10048,12 @@ def to_dict(self) -> Dict:
9953
10048
self ,
9954
10049
'human_agent_assist' ) and self .human_agent_assist is not None :
9955
10050
_dict ['human_agent_assist' ] = self .human_agent_assist
10051
+ if hasattr (self , 'spelling_suggestions'
10052
+ ) and self .spelling_suggestions is not None :
10053
+ _dict ['spelling_suggestions' ] = self .spelling_suggestions
10054
+ if hasattr (self , 'spelling_auto_correct'
10055
+ ) and self .spelling_auto_correct is not None :
10056
+ _dict ['spelling_auto_correct' ] = self .spelling_auto_correct
9956
10057
if hasattr (self ,
9957
10058
'system_entities' ) and self .system_entities is not None :
9958
10059
_dict ['system_entities' ] = self .system_entities ._to_dict ()
0 commit comments