Skip to content

Commit fa4aec2

Browse files
authored
Merge pull request #1074 from watson-developer-cloud/release-7.3.0
Release 7.3.0
2 parents c8240d8 + bf23b10 commit fa4aec2

File tree

50 files changed

+1682
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1682
-383
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ script:
4949
- "./gradlew docs > /dev/null"
5050
after_success:
5151
- bash <(curl -s https://codecov.io/bash)
52-
before_deploy:
53-
- pip install --user travis-wait-improved
5452
deploy:
5553
- provider: script
5654
skip_cleanup: true
57-
script: travis-wait-improved --timeout=30m ./gradlew bintrayUpload
55+
script: travis_wait 30 ./gradlew bintrayUpload
5856
on:
5957
tags: true
6058
jdk: openjdk7

assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ public Assistant(String versionDate, AuthenticatorConfig authenticatorConfig) {
160160
*
161161
* Send user input to a workspace and receive a response.
162162
*
163+
* **Note:** For most applications, there are significant advantages to using the v2 runtime API instead. These
164+
* advantages include ease of deployment, automatic state management, versioning, and search capabilities. For more
165+
* information, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
166+
*
163167
* There is no rate limit for this operation.
164168
*
165169
* @param messageOptions the {@link MessageOptions} containing the options for the call

assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void setLocation(final List<Long> location) {
8585
/**
8686
* Gets the value.
8787
*
88-
* The term in the input text that was recognized as an entity value.
88+
* The entity value that was recognized in the user input.
8989
*
9090
* @return the value
9191
*/
@@ -105,7 +105,7 @@ public void setValue(final String value) {
105105
/**
106106
* Gets the confidence.
107107
*
108-
* A decimal percentage that represents Watson's confidence in the entity.
108+
* A decimal percentage that represents Watson's confidence in the recognized entity.
109109
*
110110
* @return the confidence
111111
*/

assistant/src/main/java/com/ibm/watson/assistant/v2/model/DialogRuntimeResponseGeneric.java

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public interface Preference {
7272
private String messageToHumanAgent;
7373
private String topic;
7474
private List<DialogSuggestion> suggestions;
75+
private String header;
76+
private List<SearchResult> results;
7577

7678
/**
7779
* Builder.
@@ -89,6 +91,8 @@ public static class Builder {
8991
private String messageToHumanAgent;
9092
private String topic;
9193
private List<DialogSuggestion> suggestions;
94+
private String header;
95+
private List<SearchResult> results;
9296

9397
private Builder(DialogRuntimeResponseGeneric dialogRuntimeResponseGeneric) {
9498
this.responseType = dialogRuntimeResponseGeneric.responseType;
@@ -103,6 +107,8 @@ private Builder(DialogRuntimeResponseGeneric dialogRuntimeResponseGeneric) {
103107
this.messageToHumanAgent = dialogRuntimeResponseGeneric.messageToHumanAgent;
104108
this.topic = dialogRuntimeResponseGeneric.topic;
105109
this.suggestions = dialogRuntimeResponseGeneric.suggestions;
110+
this.header = dialogRuntimeResponseGeneric.header;
111+
this.results = dialogRuntimeResponseGeneric.results;
106112
}
107113

108114
/**
@@ -159,6 +165,21 @@ public Builder addSuggestions(DialogSuggestion suggestions) {
159165
return this;
160166
}
161167

168+
/**
169+
* Adds an results to results.
170+
*
171+
* @param results the new results
172+
* @return the DialogRuntimeResponseGeneric builder
173+
*/
174+
public Builder addResults(SearchResult results) {
175+
Validator.notNull(results, "results cannot be null");
176+
if (this.results == null) {
177+
this.results = new ArrayList<SearchResult>();
178+
}
179+
this.results.add(results);
180+
return this;
181+
}
182+
162183
/**
163184
* Set the responseType.
164185
*
@@ -292,6 +313,29 @@ public Builder suggestions(List<DialogSuggestion> suggestions) {
292313
this.suggestions = suggestions;
293314
return this;
294315
}
316+
317+
/**
318+
* Set the header.
319+
*
320+
* @param header the header
321+
* @return the DialogRuntimeResponseGeneric builder
322+
*/
323+
public Builder header(String header) {
324+
this.header = header;
325+
return this;
326+
}
327+
328+
/**
329+
* Set the results.
330+
* Existing results will be replaced.
331+
*
332+
* @param results the results
333+
* @return the DialogRuntimeResponseGeneric builder
334+
*/
335+
public Builder results(List<SearchResult> results) {
336+
this.results = results;
337+
return this;
338+
}
295339
}
296340

297341
private DialogRuntimeResponseGeneric(Builder builder) {
@@ -308,6 +352,8 @@ private DialogRuntimeResponseGeneric(Builder builder) {
308352
messageToHumanAgent = builder.messageToHumanAgent;
309353
topic = builder.topic;
310354
suggestions = builder.suggestions;
355+
header = builder.header;
356+
results = builder.results;
311357
}
312358

313359
/**
@@ -457,4 +503,26 @@ public String getTopic() {
457503
public List<DialogSuggestion> getSuggestions() {
458504
return suggestions;
459505
}
506+
507+
/**
508+
* Gets the header.
509+
*
510+
* The title or introductory text to show before the response. This text is defined in the search skill configuration.
511+
*
512+
* @return the header
513+
*/
514+
public String getHeader() {
515+
return header;
516+
}
517+
518+
/**
519+
* Gets the results.
520+
*
521+
* An array of objects containing search results.
522+
*
523+
* @return the results
524+
*/
525+
public List<SearchResult> getResults() {
526+
return results;
527+
}
460528
}

assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1919

2020
/**
21-
* A term from the request that was identified as an entity.
21+
* The entity value that was recognized in the user input.
2222
*/
2323
public class RuntimeEntity extends GenericModel {
2424

@@ -66,7 +66,7 @@ public String getValue() {
6666
/**
6767
* Gets the confidence.
6868
*
69-
* A decimal percentage that represents Watson's confidence in the entity.
69+
* A decimal percentage that represents Watson's confidence in the recognized entity.
7070
*
7171
* @return the confidence
7272
*/
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.assistant.v2.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* SearchResult.
20+
*/
21+
public class SearchResult extends GenericModel {
22+
23+
private String id;
24+
@SerializedName("result_metadata")
25+
private SearchResultMetadata resultMetadata;
26+
private String body;
27+
private String title;
28+
private String url;
29+
private SearchResultHighlight highlight;
30+
31+
/**
32+
* Gets the id.
33+
*
34+
* The unique identifier of the document in the Discovery service collection.
35+
*
36+
* This property is included in responses from search skills, which are a beta feature available only to Plus or
37+
* Premium plan users.
38+
*
39+
* @return the id
40+
*/
41+
public String getId() {
42+
return id;
43+
}
44+
45+
/**
46+
* Gets the resultMetadata.
47+
*
48+
* An object containing search result metadata from the Discovery service.
49+
*
50+
* @return the resultMetadata
51+
*/
52+
public SearchResultMetadata getResultMetadata() {
53+
return resultMetadata;
54+
}
55+
56+
/**
57+
* Gets the body.
58+
*
59+
* A description of the search result. This is taken from an abstract, summary, or highlight field in the Discovery
60+
* service response, as specified in the search skill configuration.
61+
*
62+
* @return the body
63+
*/
64+
public String getBody() {
65+
return body;
66+
}
67+
68+
/**
69+
* Gets the title.
70+
*
71+
* The title of the search result. This is taken from a title or name field in the Discovery service response, as
72+
* specified in the search skill configuration.
73+
*
74+
* @return the title
75+
*/
76+
public String getTitle() {
77+
return title;
78+
}
79+
80+
/**
81+
* Gets the url.
82+
*
83+
* The URL of the original data object in its native data source.
84+
*
85+
* @return the url
86+
*/
87+
public String getUrl() {
88+
return url;
89+
}
90+
91+
/**
92+
* Gets the highlight.
93+
*
94+
* An object containing segments of text from search results with query-matching text highlighted using HTML <em>
95+
* tags.
96+
*
97+
* @return the highlight
98+
*/
99+
public SearchResultHighlight getHighlight() {
100+
return highlight;
101+
}
102+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.assistant.v2.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.google.gson.reflect.TypeToken;
19+
import com.ibm.cloud.sdk.core.service.model.DynamicModel;
20+
21+
/**
22+
* An object containing segments of text from search results with query-matching text highlighted using HTML <em> tags.
23+
*/
24+
public class SearchResultHighlight extends DynamicModel<List<String>> {
25+
@SerializedName("body")
26+
private List<String> body;
27+
@SerializedName("title")
28+
private List<String> title;
29+
@SerializedName("url")
30+
private List<String> url;
31+
32+
public SearchResultHighlight() {
33+
super(new TypeToken<List<String>>() {
34+
});
35+
}
36+
37+
/**
38+
* Gets the body.
39+
*
40+
* An array of strings containing segments taken from body text in the search results, with query-matching substrings
41+
* highlighted.
42+
*
43+
* @return the body
44+
*/
45+
public List<String> getBody() {
46+
return this.body;
47+
}
48+
49+
/**
50+
* Gets the title.
51+
*
52+
* An array of strings containing segments taken from title text in the search results, with query-matching substrings
53+
* highlighted.
54+
*
55+
* @return the title
56+
*/
57+
public List<String> getTitle() {
58+
return this.title;
59+
}
60+
61+
/**
62+
* Gets the url.
63+
*
64+
* An array of strings containing segments taken from URLs in the search results, with query-matching substrings
65+
* highlighted.
66+
*
67+
* @return the url
68+
*/
69+
public List<String> getUrl() {
70+
return this.url;
71+
}
72+
}

0 commit comments

Comments
 (0)