Skip to content

Commit

Permalink
feat(assistantv1): New param include_audit in create_example, `up…
Browse files Browse the repository at this point in the history
…date_example`, `create_counterexample`, `update_counterexample`, `create_entity`
  • Loading branch information
ehdsouza committed Feb 11, 2020
1 parent 3b015f9 commit b1f99ec
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions ibm_watson/assistant_v1.py
Expand Up @@ -934,6 +934,7 @@ def create_example(self,
text: str,
*,
mentions: List['Mention'] = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Create user input example.
Expand All @@ -952,6 +953,8 @@ def create_example(self,
- It cannot consist of only whitespace characters.
:param List[Mention] mentions: (optional) An array of contextual entity
mentions.
:param bool include_audit: (optional) Whether to include the audit
properties (`created` and `updated` timestamps) in the response.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
Expand All @@ -974,7 +977,7 @@ def create_example(self,
operation_id='create_example')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {'text': text, 'mentions': mentions}

Expand Down Expand Up @@ -1047,6 +1050,7 @@ def update_example(self,
*,
new_text: str = None,
new_mentions: List['Mention'] = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Update user input example.
Expand All @@ -1066,6 +1070,8 @@ def update_example(self,
- It cannot consist of only whitespace characters.
:param List[Mention] new_mentions: (optional) An array of contextual entity
mentions.
:param bool include_audit: (optional) Whether to include the audit
properties (`created` and `updated` timestamps) in the response.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
Expand All @@ -1088,7 +1094,7 @@ def update_example(self,
operation_id='update_example')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {'text': new_text, 'mentions': new_mentions}

Expand Down Expand Up @@ -1211,7 +1217,11 @@ def list_counterexamples(self,
response = self.send(request)
return response

def create_counterexample(self, workspace_id: str, text: str,
def create_counterexample(self,
workspace_id: str,
text: str,
*,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Create counterexample.
Expand All @@ -1228,6 +1238,8 @@ def create_counterexample(self, workspace_id: str, text: str,
string must conform to the following restrictions:
- It cannot contain carriage return, newline, or tab characters.
- It cannot consist of only whitespace characters.
:param bool include_audit: (optional) Whether to include the audit
properties (`created` and `updated` timestamps) in the response.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
Expand All @@ -1246,7 +1258,7 @@ def create_counterexample(self, workspace_id: str, text: str,
operation_id='create_counterexample')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {'text': text}

Expand Down Expand Up @@ -1315,6 +1327,7 @@ def update_counterexample(self,
text: str,
*,
new_text: str = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Update counterexample.
Expand All @@ -1333,6 +1346,8 @@ def update_counterexample(self,
irrelevant input. This string must conform to the following restrictions:
- It cannot contain carriage return, newline, or tab characters.
- It cannot consist of only whitespace characters.
:param bool include_audit: (optional) Whether to include the audit
properties (`created` and `updated` timestamps) in the response.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
Expand All @@ -1351,7 +1366,7 @@ def update_counterexample(self,
operation_id='update_counterexample')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {'text': new_text}

Expand Down Expand Up @@ -1487,6 +1502,7 @@ def create_entity(self,
metadata: dict = None,
fuzzy_match: bool = None,
values: List['CreateValue'] = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Create entity.
Expand All @@ -1512,6 +1528,8 @@ def create_entity(self,
entity.
:param List[CreateValue] values: (optional) An array of objects describing
the entity values.
:param bool include_audit: (optional) Whether to include the audit
properties (`created` and `updated` timestamps) in the response.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
Expand All @@ -1532,7 +1550,7 @@ def create_entity(self,
operation_id='create_entity')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {
'entity': entity,
Expand Down

0 comments on commit b1f99ec

Please sign in to comment.