@@ -132,15 +132,15 @@ def message(self,
132
132
if workspace_id is None :
133
133
raise ValueError ('workspace_id must be provided' )
134
134
if input is not None :
135
- input = self ._convert_model (input , MessageInput )
135
+ input = self ._convert_model (input )
136
136
if intents is not None :
137
- intents = [self ._convert_model (x , RuntimeIntent ) for x in intents ]
137
+ intents = [self ._convert_model (x ) for x in intents ]
138
138
if entities is not None :
139
- entities = [self ._convert_model (x , RuntimeEntity ) for x in entities ]
139
+ entities = [self ._convert_model (x ) for x in entities ]
140
140
if context is not None :
141
- context = self ._convert_model (context , Context )
141
+ context = self ._convert_model (context )
142
142
if output is not None :
143
- output = self ._convert_model (output , OutputData )
143
+ output = self ._convert_model (output )
144
144
145
145
headers = {}
146
146
if 'headers' in kwargs :
@@ -277,20 +277,15 @@ def create_workspace(self,
277
277
"""
278
278
279
279
if system_settings is not None :
280
- system_settings = self ._convert_model (system_settings ,
281
- WorkspaceSystemSettings )
280
+ system_settings = self ._convert_model (system_settings )
282
281
if intents is not None :
283
- intents = [self ._convert_model (x , CreateIntent ) for x in intents ]
282
+ intents = [self ._convert_model (x ) for x in intents ]
284
283
if entities is not None :
285
- entities = [self ._convert_model (x , CreateEntity ) for x in entities ]
284
+ entities = [self ._convert_model (x ) for x in entities ]
286
285
if dialog_nodes is not None :
287
- dialog_nodes = [
288
- self ._convert_model (x , DialogNode ) for x in dialog_nodes
289
- ]
286
+ dialog_nodes = [self ._convert_model (x ) for x in dialog_nodes ]
290
287
if counterexamples is not None :
291
- counterexamples = [
292
- self ._convert_model (x , Counterexample ) for x in counterexamples
293
- ]
288
+ counterexamples = [self ._convert_model (x ) for x in counterexamples ]
294
289
295
290
headers = {}
296
291
if 'headers' in kwargs :
@@ -442,20 +437,15 @@ def update_workspace(self,
442
437
if workspace_id is None :
443
438
raise ValueError ('workspace_id must be provided' )
444
439
if system_settings is not None :
445
- system_settings = self ._convert_model (system_settings ,
446
- WorkspaceSystemSettings )
440
+ system_settings = self ._convert_model (system_settings )
447
441
if intents is not None :
448
- intents = [self ._convert_model (x , CreateIntent ) for x in intents ]
442
+ intents = [self ._convert_model (x ) for x in intents ]
449
443
if entities is not None :
450
- entities = [self ._convert_model (x , CreateEntity ) for x in entities ]
444
+ entities = [self ._convert_model (x ) for x in entities ]
451
445
if dialog_nodes is not None :
452
- dialog_nodes = [
453
- self ._convert_model (x , DialogNode ) for x in dialog_nodes
454
- ]
446
+ dialog_nodes = [self ._convert_model (x ) for x in dialog_nodes ]
455
447
if counterexamples is not None :
456
- counterexamples = [
457
- self ._convert_model (x , Counterexample ) for x in counterexamples
458
- ]
448
+ counterexamples = [self ._convert_model (x ) for x in counterexamples ]
459
449
460
450
headers = {}
461
451
if 'headers' in kwargs :
@@ -629,7 +619,7 @@ def create_intent(self,
629
619
if intent is None :
630
620
raise ValueError ('intent must be provided' )
631
621
if examples is not None :
632
- examples = [self ._convert_model (x , Example ) for x in examples ]
622
+ examples = [self ._convert_model (x ) for x in examples ]
633
623
634
624
headers = {}
635
625
if 'headers' in kwargs :
@@ -752,9 +742,7 @@ def update_intent(self,
752
742
if intent is None :
753
743
raise ValueError ('intent must be provided' )
754
744
if new_examples is not None :
755
- new_examples = [
756
- self ._convert_model (x , Example ) for x in new_examples
757
- ]
745
+ new_examples = [self ._convert_model (x ) for x in new_examples ]
758
746
759
747
headers = {}
760
748
if 'headers' in kwargs :
@@ -924,7 +912,7 @@ def create_example(self,
924
912
if text is None :
925
913
raise ValueError ('text must be provided' )
926
914
if mentions is not None :
927
- mentions = [self ._convert_model (x , Mention ) for x in mentions ]
915
+ mentions = [self ._convert_model (x ) for x in mentions ]
928
916
929
917
headers = {}
930
918
if 'headers' in kwargs :
@@ -1036,9 +1024,7 @@ def update_example(self,
1036
1024
if text is None :
1037
1025
raise ValueError ('text must be provided' )
1038
1026
if new_mentions is not None :
1039
- new_mentions = [
1040
- self ._convert_model (x , Mention ) for x in new_mentions
1041
- ]
1027
+ new_mentions = [self ._convert_model (x ) for x in new_mentions ]
1042
1028
1043
1029
headers = {}
1044
1030
if 'headers' in kwargs :
@@ -1476,7 +1462,7 @@ def create_entity(self,
1476
1462
if entity is None :
1477
1463
raise ValueError ('entity must be provided' )
1478
1464
if values is not None :
1479
- values = [self ._convert_model (x , CreateValue ) for x in values ]
1465
+ values = [self ._convert_model (x ) for x in values ]
1480
1466
1481
1467
headers = {}
1482
1468
if 'headers' in kwargs :
@@ -1606,9 +1592,7 @@ def update_entity(self,
1606
1592
if entity is None :
1607
1593
raise ValueError ('entity must be provided' )
1608
1594
if new_values is not None :
1609
- new_values = [
1610
- self ._convert_model (x , CreateValue ) for x in new_values
1611
- ]
1595
+ new_values = [self ._convert_model (x ) for x in new_values ]
1612
1596
1613
1597
headers = {}
1614
1598
if 'headers' in kwargs :
@@ -2498,13 +2482,11 @@ def create_dialog_node(self,
2498
2482
if dialog_node is None :
2499
2483
raise ValueError ('dialog_node must be provided' )
2500
2484
if output is not None :
2501
- output = self ._convert_model (output , DialogNodeOutput )
2485
+ output = self ._convert_model (output )
2502
2486
if next_step is not None :
2503
- next_step = self ._convert_model (next_step , DialogNodeNextStep )
2487
+ next_step = self ._convert_model (next_step )
2504
2488
if actions is not None :
2505
- actions = [
2506
- self ._convert_model (x , DialogNodeAction ) for x in actions
2507
- ]
2489
+ actions = [self ._convert_model (x ) for x in actions ]
2508
2490
2509
2491
headers = {}
2510
2492
if 'headers' in kwargs :
@@ -2678,14 +2660,11 @@ def update_dialog_node(self,
2678
2660
if dialog_node is None :
2679
2661
raise ValueError ('dialog_node must be provided' )
2680
2662
if new_output is not None :
2681
- new_output = self ._convert_model (new_output , DialogNodeOutput )
2663
+ new_output = self ._convert_model (new_output )
2682
2664
if new_next_step is not None :
2683
- new_next_step = self ._convert_model (new_next_step ,
2684
- DialogNodeNextStep )
2665
+ new_next_step = self ._convert_model (new_next_step )
2685
2666
if new_actions is not None :
2686
- new_actions = [
2687
- self ._convert_model (x , DialogNodeAction ) for x in new_actions
2688
- ]
2667
+ new_actions = [self ._convert_model (x ) for x in new_actions ]
2689
2668
2690
2669
headers = {}
2691
2670
if 'headers' in kwargs :
0 commit comments