1
1
# -*- coding: utf-8 -*-
2
- # (C) Copyright IBM Corp. 2018, 2020.
2
+ # (C) Copyright IBM Corp. 2020.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -277,14 +277,15 @@ def construct_full_body(self):
277
277
"system_settings" :
278
278
WorkspaceSystemSettings ._from_dict (
279
279
json .loads (
280
- """{"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "off_topic": {"enabled": false}}"""
280
+ """{"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "system_entities": {"enabled": false}, " off_topic": {"enabled": false}}"""
281
281
)),
282
282
"intents" : [],
283
283
"entities" : [],
284
284
"dialog_nodes" : [],
285
285
"counterexamples" : [],
286
286
"webhooks" : [],
287
287
})
288
+ body ['include_audit' ] = True
288
289
return body
289
290
290
291
def construct_required_body (self ):
@@ -442,7 +443,7 @@ def construct_full_body(self):
442
443
"system_settings" :
443
444
WorkspaceSystemSettings ._from_dict (
444
445
json .loads (
445
- """{"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "off_topic": {"enabled": false}}"""
446
+ """{"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "system_entities": {"enabled": false}, " off_topic": {"enabled": false}}"""
446
447
)),
447
448
"intents" : [],
448
449
"entities" : [],
@@ -451,6 +452,7 @@ def construct_full_body(self):
451
452
"webhooks" : [],
452
453
})
453
454
body ['append' ] = True
455
+ body ['include_audit' ] = True
454
456
return body
455
457
456
458
def construct_required_body (self ):
@@ -682,6 +684,7 @@ def construct_full_body(self):
682
684
"description" : "string1" ,
683
685
"examples" : [],
684
686
})
687
+ body ['include_audit' ] = True
685
688
return body
686
689
687
690
def construct_required_body (self ):
@@ -839,6 +842,8 @@ def construct_full_body(self):
839
842
"new_description" : "string1" ,
840
843
"new_examples" : [],
841
844
})
845
+ body ['append' ] = True
846
+ body ['include_audit' ] = True
842
847
return body
843
848
844
849
def construct_required_body (self ):
@@ -1082,6 +1087,7 @@ def construct_full_body(self):
1082
1087
"text" : "string1" ,
1083
1088
"mentions" : [],
1084
1089
})
1090
+ body ['include_audit' ] = True
1085
1091
return body
1086
1092
1087
1093
def construct_required_body (self ):
@@ -1240,6 +1246,7 @@ def construct_full_body(self):
1240
1246
"new_text" : "string1" ,
1241
1247
"new_mentions" : [],
1242
1248
})
1249
+ body ['include_audit' ] = True
1243
1250
return body
1244
1251
1245
1252
def construct_required_body (self ):
@@ -1482,6 +1489,7 @@ def construct_full_body(self):
1482
1489
body .update ({
1483
1490
"text" : "string1" ,
1484
1491
})
1492
+ body ['include_audit' ] = True
1485
1493
return body
1486
1494
1487
1495
def construct_required_body (self ):
@@ -1634,6 +1642,7 @@ def construct_full_body(self):
1634
1642
body .update ({
1635
1643
"new_text" : "string1" ,
1636
1644
})
1645
+ body ['include_audit' ] = True
1637
1646
return body
1638
1647
1639
1648
def construct_required_body (self ):
@@ -1876,6 +1885,7 @@ def construct_full_body(self):
1876
1885
"fuzzy_match" : True ,
1877
1886
"values" : [],
1878
1887
})
1888
+ body ['include_audit' ] = True
1879
1889
return body
1880
1890
1881
1891
def construct_required_body (self ):
@@ -2041,6 +2051,8 @@ def construct_full_body(self):
2041
2051
"new_fuzzy_match" : True ,
2042
2052
"new_values" : [],
2043
2053
})
2054
+ body ['append' ] = True
2055
+ body ['include_audit' ] = True
2044
2056
return body
2045
2057
2046
2058
def construct_required_body (self ):
@@ -2381,6 +2393,7 @@ def construct_full_body(self):
2381
2393
"synonyms" : [],
2382
2394
"patterns" : [],
2383
2395
})
2396
+ body ['include_audit' ] = True
2384
2397
return body
2385
2398
2386
2399
def construct_required_body (self ):
@@ -2550,6 +2563,8 @@ def construct_full_body(self):
2550
2563
"new_synonyms" : [],
2551
2564
"new_patterns" : [],
2552
2565
})
2566
+ body ['append' ] = True
2567
+ body ['include_audit' ] = True
2553
2568
return body
2554
2569
2555
2570
def construct_required_body (self ):
@@ -2802,6 +2817,7 @@ def construct_full_body(self):
2802
2817
body .update ({
2803
2818
"synonym" : "string1" ,
2804
2819
})
2820
+ body ['include_audit' ] = True
2805
2821
return body
2806
2822
2807
2823
def construct_required_body (self ):
@@ -2964,6 +2980,7 @@ def construct_full_body(self):
2964
2980
body .update ({
2965
2981
"new_synonym" : "string1" ,
2966
2982
})
2983
+ body ['include_audit' ] = True
2967
2984
return body
2968
2985
2969
2986
def construct_required_body (self ):
@@ -3253,6 +3270,7 @@ def construct_full_body(self):
3253
3270
"disambiguation_opt_out" :
3254
3271
True ,
3255
3272
})
3273
+ body ['include_audit' ] = True
3256
3274
return body
3257
3275
3258
3276
def construct_required_body (self ):
@@ -3493,6 +3511,7 @@ def construct_full_body(self):
3493
3511
"new_disambiguation_opt_out" :
3494
3512
True ,
3495
3513
})
3514
+ body ['include_audit' ] = True
3496
3515
return body
3497
3516
3498
3517
def construct_required_body (self ):
@@ -3937,9 +3956,9 @@ def send_request(obj, body, response, url=None):
3937
3956
fake_response__json = None
3938
3957
fake_response_MessageResponse_json = """{"input": {"text": "fake_text"}, "intents": [], "entities": [], "alternate_intents": false, "context": {"conversation_id": "fake_conversation_id", "system": {}, "metadata": {"deployment": "fake_deployment", "user_id": "fake_user_id"}}, "output": {"nodes_visited": [], "nodes_visited_details": [], "log_messages": [], "text": [], "generic": []}, "actions": []}"""
3939
3958
fake_response_WorkspaceCollection_json = """{"workspaces": [], "pagination": {"refresh_url": "fake_refresh_url", "next_url": "fake_next_url", "total": 5, "matched": 7, "refresh_cursor": "fake_refresh_cursor", "next_cursor": "fake_next_cursor"}}"""
3940
- fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3941
- fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3942
- fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3959
+ fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "system_entities": {"enabled": false}, " off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3960
+ fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "system_entities": {"enabled": false}, " off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3961
+ fake_response_Workspace_json = """{"name": "fake_name", "description": "fake_description", "language": "fake_language", "learning_opt_out": true, "system_settings": {"tooling": {"store_generic_responses": false}, "disambiguation": {"prompt": "fake_prompt", "none_of_the_above_prompt": "fake_none_of_the_above_prompt", "enabled": false, "sensitivity": "fake_sensitivity", "randomize": false, "max_suggestions": 15, "suggestion_text_policy": "fake_suggestion_text_policy"}, "system_entities": {"enabled": false}, " off_topic": {"enabled": false}}, "workspace_id": "fake_workspace_id", "status": "fake_status", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "intents": [], "entities": [], "dialog_nodes": [], "counterexamples": [], "webhooks": []}"""
3943
3962
fake_response_IntentCollection_json = """{"intents": [], "pagination": {"refresh_url": "fake_refresh_url", "next_url": "fake_next_url", "total": 5, "matched": 7, "refresh_cursor": "fake_refresh_cursor", "next_cursor": "fake_next_cursor"}}"""
3944
3963
fake_response_Intent_json = """{"intent": "fake_intent", "description": "fake_description", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "examples": []}"""
3945
3964
fake_response_Intent_json = """{"intent": "fake_intent", "description": "fake_description", "created": "2017-05-16T13:56:54.957Z", "updated": "2017-05-16T13:56:54.957Z", "examples": []}"""
0 commit comments