@@ -1219,17 +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 dict system: (optional) For internal use only .
1222
+ :attr dict system: (optional) System context data used by the skill .
1223
1223
"""
1224
1224
1225
- def __init__ (self , * , user_defined : dict = None ,
1225
+ def __init__ (self ,
1226
+ * ,
1227
+ user_defined : dict = None ,
1226
1228
system : dict = None ) -> None :
1227
1229
"""
1228
1230
Initialize a MessageContextSkill object.
1229
1231
1230
1232
:param dict user_defined: (optional) Arbitrary variables that can be read
1231
1233
and written by a particular skill.
1232
- :param dict system: (optional) For internal use only .
1234
+ :param dict system: (optional) System context data used by the skill .
1233
1235
"""
1234
1236
self .user_defined = user_defined
1235
1237
self .system = system
@@ -1488,49 +1490,68 @@ class MessageInputOptions():
1488
1490
Optional properties that control how the assistant responds.
1489
1491
1490
1492
:attr bool debug: (optional) Whether to return additional diagnostic
1491
- information. Set to `true` to return additional information under the
1492
- `output.debug` key.
1493
+ information. Set to `true` to return additional information in the
1494
+ `output.debug` property. If you also specify **return_context**=`true`, the
1495
+ returned skill context includes the `system.state` property.
1493
1496
:attr bool restart: (optional) Whether to restart dialog processing at the root
1494
1497
of the dialog, regardless of any previously visited nodes. **Note:** This does
1495
1498
not affect `turn_count` or any other context variables.
1496
1499
:attr bool alternate_intents: (optional) Whether to return more than one intent.
1497
1500
Set to `true` to return all matching intents.
1498
1501
:attr bool return_context: (optional) Whether to return session context with the
1499
- response. If you specify `true`, the response will include the `context`
1500
- property.
1502
+ response. If you specify `true`, the response includes the `context` property.
1503
+ If you also specify **debug**=`true`, the returned skill context includes the
1504
+ `system.state` property.
1505
+ :attr bool export: (optional) Whether to return session context, including full
1506
+ conversation state. If you specify `true`, the response includes the `context`
1507
+ property, and the skill context includes the `system.state` property.
1508
+ **Note:** If **export**=`true`, the context is returned regardless of the value
1509
+ of **return_context**.
1501
1510
"""
1502
1511
1503
1512
def __init__ (self ,
1504
1513
* ,
1505
1514
debug : bool = None ,
1506
1515
restart : bool = None ,
1507
1516
alternate_intents : bool = None ,
1508
- return_context : bool = None ) -> None :
1517
+ return_context : bool = None ,
1518
+ export : bool = None ) -> None :
1509
1519
"""
1510
1520
Initialize a MessageInputOptions object.
1511
1521
1512
1522
:param bool debug: (optional) Whether to return additional diagnostic
1513
- information. Set to `true` to return additional information under the
1514
- `output.debug` key.
1523
+ information. Set to `true` to return additional information in the
1524
+ `output.debug` property. If you also specify **return_context**=`true`, the
1525
+ returned skill context includes the `system.state` property.
1515
1526
:param bool restart: (optional) Whether to restart dialog processing at the
1516
1527
root of the dialog, regardless of any previously visited nodes. **Note:**
1517
1528
This does not affect `turn_count` or any other context variables.
1518
1529
:param bool alternate_intents: (optional) Whether to return more than one
1519
1530
intent. Set to `true` to return all matching intents.
1520
1531
:param bool return_context: (optional) Whether to return session context
1521
- with the response. If you specify `true`, the response will include the
1522
- `context` property.
1532
+ with the response. If you specify `true`, the response includes the
1533
+ `context` property. If you also specify **debug**=`true`, the returned
1534
+ skill context includes the `system.state` property.
1535
+ :param bool export: (optional) Whether to return session context, including
1536
+ full conversation state. If you specify `true`, the response includes the
1537
+ `context` property, and the skill context includes the `system.state`
1538
+ property.
1539
+ **Note:** If **export**=`true`, the context is returned regardless of the
1540
+ value of **return_context**.
1523
1541
"""
1524
1542
self .debug = debug
1525
1543
self .restart = restart
1526
1544
self .alternate_intents = alternate_intents
1527
1545
self .return_context = return_context
1546
+ self .export = export
1528
1547
1529
1548
@classmethod
1530
1549
def from_dict (cls , _dict : Dict ) -> 'MessageInputOptions' :
1531
1550
"""Initialize a MessageInputOptions object from a json dictionary."""
1532
1551
args = {}
1533
- valid_keys = ['debug' , 'restart' , 'alternate_intents' , 'return_context' ]
1552
+ valid_keys = [
1553
+ 'debug' , 'restart' , 'alternate_intents' , 'return_context' , 'export'
1554
+ ]
1534
1555
bad_keys = set (_dict .keys ()) - set (valid_keys )
1535
1556
if bad_keys :
1536
1557
raise ValueError (
@@ -1544,6 +1565,8 @@ def from_dict(cls, _dict: Dict) -> 'MessageInputOptions':
1544
1565
args ['alternate_intents' ] = _dict .get ('alternate_intents' )
1545
1566
if 'return_context' in _dict :
1546
1567
args ['return_context' ] = _dict .get ('return_context' )
1568
+ if 'export' in _dict :
1569
+ args ['export' ] = _dict .get ('export' )
1547
1570
return cls (** args )
1548
1571
1549
1572
@classmethod
@@ -1563,6 +1586,8 @@ def to_dict(self) -> Dict:
1563
1586
_dict ['alternate_intents' ] = self .alternate_intents
1564
1587
if hasattr (self , 'return_context' ) and self .return_context is not None :
1565
1588
_dict ['return_context' ] = self .return_context
1589
+ if hasattr (self , 'export' ) and self .export is not None :
1590
+ _dict ['export' ] = self .export
1566
1591
return _dict
1567
1592
1568
1593
def _to_dict (self ):
@@ -1836,8 +1861,8 @@ class MessageResponse():
1836
1861
1837
1862
:attr MessageOutput output: Assistant output to be rendered or processed by the
1838
1863
client.
1839
- :attr MessageContext context: (optional) State information for the conversation.
1840
- The context is stored by the assistant on a per-session basis. You can use this
1864
+ :attr MessageContext context: (optional) Context data for the conversation. The
1865
+ context is stored by the assistant on a per-session basis. You can use this
1841
1866
property to access context variables.
1842
1867
**Note:** The context is included in message responses only if
1843
1868
**return_context**=`true` in the message request.
@@ -1852,7 +1877,7 @@ def __init__(self,
1852
1877
1853
1878
:param MessageOutput output: Assistant output to be rendered or processed
1854
1879
by the client.
1855
- :param MessageContext context: (optional) State information for the
1880
+ :param MessageContext context: (optional) Context data for the
1856
1881
conversation. The context is stored by the assistant on a per-session
1857
1882
basis. You can use this property to access context variables.
1858
1883
**Note:** The context is included in message responses only if
@@ -3191,7 +3216,9 @@ class SearchResultMetadata():
3191
3216
indicates a greater match to the query parameters.
3192
3217
"""
3193
3218
3194
- def __init__ (self , * , confidence : float = None ,
3219
+ def __init__ (self ,
3220
+ * ,
3221
+ confidence : float = None ,
3195
3222
score : float = None ) -> None :
3196
3223
"""
3197
3224
Initialize a SearchResultMetadata object.
0 commit comments