@@ -132,15 +132,15 @@ def message(self,
132132 if workspace_id is None :
133133 raise ValueError ('workspace_id must be provided' )
134134 if input is not None :
135- input = self ._convert_model (input , MessageInput )
135+ input = self ._convert_model (input )
136136 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 ]
138138 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 ]
140140 if context is not None :
141- context = self ._convert_model (context , Context )
141+ context = self ._convert_model (context )
142142 if output is not None :
143- output = self ._convert_model (output , OutputData )
143+ output = self ._convert_model (output )
144144
145145 headers = {}
146146 if 'headers' in kwargs :
@@ -277,20 +277,15 @@ def create_workspace(self,
277277 """
278278
279279 if system_settings is not None :
280- system_settings = self ._convert_model (system_settings ,
281- WorkspaceSystemSettings )
280+ system_settings = self ._convert_model (system_settings )
282281 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 ]
284283 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 ]
286285 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 ]
290287 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 ]
294289
295290 headers = {}
296291 if 'headers' in kwargs :
@@ -442,20 +437,15 @@ def update_workspace(self,
442437 if workspace_id is None :
443438 raise ValueError ('workspace_id must be provided' )
444439 if system_settings is not None :
445- system_settings = self ._convert_model (system_settings ,
446- WorkspaceSystemSettings )
440+ system_settings = self ._convert_model (system_settings )
447441 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 ]
449443 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 ]
451445 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 ]
455447 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 ]
459449
460450 headers = {}
461451 if 'headers' in kwargs :
@@ -629,7 +619,7 @@ def create_intent(self,
629619 if intent is None :
630620 raise ValueError ('intent must be provided' )
631621 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 ]
633623
634624 headers = {}
635625 if 'headers' in kwargs :
@@ -752,9 +742,7 @@ def update_intent(self,
752742 if intent is None :
753743 raise ValueError ('intent must be provided' )
754744 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 ]
758746
759747 headers = {}
760748 if 'headers' in kwargs :
@@ -924,7 +912,7 @@ def create_example(self,
924912 if text is None :
925913 raise ValueError ('text must be provided' )
926914 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 ]
928916
929917 headers = {}
930918 if 'headers' in kwargs :
@@ -1036,9 +1024,7 @@ def update_example(self,
10361024 if text is None :
10371025 raise ValueError ('text must be provided' )
10381026 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 ]
10421028
10431029 headers = {}
10441030 if 'headers' in kwargs :
@@ -1476,7 +1462,7 @@ def create_entity(self,
14761462 if entity is None :
14771463 raise ValueError ('entity must be provided' )
14781464 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 ]
14801466
14811467 headers = {}
14821468 if 'headers' in kwargs :
@@ -1606,9 +1592,7 @@ def update_entity(self,
16061592 if entity is None :
16071593 raise ValueError ('entity must be provided' )
16081594 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 ]
16121596
16131597 headers = {}
16141598 if 'headers' in kwargs :
@@ -2498,13 +2482,11 @@ def create_dialog_node(self,
24982482 if dialog_node is None :
24992483 raise ValueError ('dialog_node must be provided' )
25002484 if output is not None :
2501- output = self ._convert_model (output , DialogNodeOutput )
2485+ output = self ._convert_model (output )
25022486 if next_step is not None :
2503- next_step = self ._convert_model (next_step , DialogNodeNextStep )
2487+ next_step = self ._convert_model (next_step )
25042488 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 ]
25082490
25092491 headers = {}
25102492 if 'headers' in kwargs :
@@ -2678,14 +2660,11 @@ def update_dialog_node(self,
26782660 if dialog_node is None :
26792661 raise ValueError ('dialog_node must be provided' )
26802662 if new_output is not None :
2681- new_output = self ._convert_model (new_output , DialogNodeOutput )
2663+ new_output = self ._convert_model (new_output )
26822664 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 )
26852666 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 ]
26892668
26902669 headers = {}
26912670 if 'headers' in kwargs :
0 commit comments