@@ -1219,21 +1219,19 @@ class MessageContextSkill():
1219
1219
1220
1220
:attr dict user_defined: (optional) Arbitrary variables that can be read and
1221
1221
written by a particular skill.
1222
- :attr MessageContextSkillSystem system: (optional) System context data used by
1223
- the skill.
1222
+ :attr dict system: (optional) System context data used by the skill.
1224
1223
"""
1225
1224
1226
1225
def __init__ (self ,
1227
1226
* ,
1228
1227
user_defined : dict = None ,
1229
- system : 'MessageContextSkillSystem' = None ) -> None :
1228
+ system : dict = None ) -> None :
1230
1229
"""
1231
1230
Initialize a MessageContextSkill object.
1232
1231
1233
1232
:param dict user_defined: (optional) Arbitrary variables that can be read
1234
1233
and written by a particular skill.
1235
- :param MessageContextSkillSystem system: (optional) System context data
1236
- used by the skill.
1234
+ :param dict system: (optional) System context data used by the skill.
1237
1235
"""
1238
1236
self .user_defined = user_defined
1239
1237
self .system = system
@@ -1251,8 +1249,7 @@ def from_dict(cls, _dict: Dict) -> 'MessageContextSkill':
1251
1249
if 'user_defined' in _dict :
1252
1250
args ['user_defined' ] = _dict .get ('user_defined' )
1253
1251
if 'system' in _dict :
1254
- args ['system' ] = MessageContextSkillSystem ._from_dict (
1255
- _dict .get ('system' ))
1252
+ args ['system' ] = _dict .get ('system' )
1256
1253
return cls (** args )
1257
1254
1258
1255
@classmethod
@@ -1266,7 +1263,7 @@ def to_dict(self) -> Dict:
1266
1263
if hasattr (self , 'user_defined' ) and self .user_defined is not None :
1267
1264
_dict ['user_defined' ] = self .user_defined
1268
1265
if hasattr (self , 'system' ) and self .system is not None :
1269
- _dict ['system' ] = self .system . _to_dict ()
1266
+ _dict ['system' ] = self .system
1270
1267
return _dict
1271
1268
1272
1269
def _to_dict (self ):
@@ -1288,89 +1285,6 @@ def __ne__(self, other: 'MessageContextSkill') -> bool:
1288
1285
return not self == other
1289
1286
1290
1287
1291
- class MessageContextSkillSystem ():
1292
- """
1293
- System context data used by the skill.
1294
-
1295
- :attr str state: (optional) An encoded string representing the current
1296
- conversation state. By saving this value and then sending it in the context of a
1297
- subsequent message request, you can restore the conversation to the same state.
1298
- This can be useful if you need to return to an earlier point in the conversation
1299
- or resume a paused conversation after the session has expired.
1300
- """
1301
-
1302
- def __init__ (self , * , state : str = None , ** kwargs ) -> None :
1303
- """
1304
- Initialize a MessageContextSkillSystem object.
1305
-
1306
- :param str state: (optional) An encoded string representing the current
1307
- conversation state. By saving this value and then sending it in the context
1308
- of a subsequent message request, you can restore the conversation to the
1309
- same state. This can be useful if you need to return to an earlier point in
1310
- the conversation or resume a paused conversation after the session has
1311
- expired.
1312
- :param **kwargs: (optional) Any additional properties.
1313
- """
1314
- self .state = state
1315
- for _key , _value in kwargs .items ():
1316
- setattr (self , _key , _value )
1317
-
1318
- @classmethod
1319
- def from_dict (cls , _dict : Dict ) -> 'MessageContextSkillSystem' :
1320
- """Initialize a MessageContextSkillSystem object from a json dictionary."""
1321
- args = {}
1322
- xtra = _dict .copy ()
1323
- if 'state' in _dict :
1324
- args ['state' ] = _dict .get ('state' )
1325
- del xtra ['state' ]
1326
- args .update (xtra )
1327
- return cls (** args )
1328
-
1329
- @classmethod
1330
- def _from_dict (cls , _dict ):
1331
- """Initialize a MessageContextSkillSystem object from a json dictionary."""
1332
- return cls .from_dict (_dict )
1333
-
1334
- def to_dict (self ) -> Dict :
1335
- """Return a json dictionary representing this model."""
1336
- _dict = {}
1337
- if hasattr (self , 'state' ) and self .state is not None :
1338
- _dict ['state' ] = self .state
1339
- if hasattr (self , '_additionalProperties' ):
1340
- for _key in self ._additionalProperties :
1341
- _value = getattr (self , _key , None )
1342
- if _value is not None :
1343
- _dict [_key ] = _value
1344
- return _dict
1345
-
1346
- def _to_dict (self ):
1347
- """Return a json dictionary representing this model."""
1348
- return self .to_dict ()
1349
-
1350
- def __setattr__ (self , name : str , value : object ) -> None :
1351
- properties = {'state' }
1352
- if not hasattr (self , '_additionalProperties' ):
1353
- super (MessageContextSkillSystem ,
1354
- self ).__setattr__ ('_additionalProperties' , set ())
1355
- if name not in properties :
1356
- self ._additionalProperties .add (name )
1357
- super (MessageContextSkillSystem , self ).__setattr__ (name , value )
1358
-
1359
- def __str__ (self ) -> str :
1360
- """Return a `str` version of this MessageContextSkillSystem object."""
1361
- return json .dumps (self ._to_dict (), indent = 2 )
1362
-
1363
- def __eq__ (self , other : 'MessageContextSkillSystem' ) -> bool :
1364
- """Return `true` when self and other are equal, false otherwise."""
1365
- if not isinstance (other , self .__class__ ):
1366
- return False
1367
- return self .__dict__ == other .__dict__
1368
-
1369
- def __ne__ (self , other : 'MessageContextSkillSystem' ) -> bool :
1370
- """Return `true` when self and other are not equal, false otherwise."""
1371
- return not self == other
1372
-
1373
-
1374
1288
class MessageContextSkills ():
1375
1289
"""
1376
1290
Information specific to particular skills used by the Assistant.
0 commit comments