File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -923,4 +923,32 @@ ConversationV1.prototype.getCounterExamples = function(params, callback) {
923
923
return requestFactory ( parameters , callback ) ;
924
924
} ;
925
925
926
+ /**
927
+ * Method: createCounterExample
928
+ *
929
+ * Add a new counterexample to a workspace. Counterexamples are examples that have been marked as irrelevant input.
930
+ *
931
+ * @param {Object } params
932
+ * @param {String } params.workspace_id
933
+ * @param {String } params.text The text of a user input example.
934
+ * @param {Function } [callback]
935
+ *
936
+ */
937
+ ConversationV1 . prototype . createCounterExample = function ( params , callback ) {
938
+ params = params || { } ;
939
+
940
+ const parameters = {
941
+ options : {
942
+ url : '/v1/workspaces/{workspace_id}/counterexamples' ,
943
+ method : 'POST' ,
944
+ json : true ,
945
+ path : pick ( params , [ 'workspace_id' ] ) ,
946
+ body : pick ( params , [ 'text' ] )
947
+ } ,
948
+ requiredParams : [ 'workspace_id' , 'text' ] ,
949
+ defaultOptions : this . _options
950
+ } ;
951
+ return requestFactory ( parameters , callback ) ;
952
+ } ;
953
+
926
954
module . exports = ConversationV1 ;
You can’t perform that action at this time.
0 commit comments