File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed
src/IBM.Watson.Assistant.v2/Model Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 11/**
2- * (C) Copyright IBM Corp. 2019, 2021.
2+ * (C) Copyright IBM Corp. 2021.
33*
44* Licensed under the Apache License, Version 2.0 (the "License");
55* you may not use this file except in compliance with the License.
1515*
1616*/
1717
18+ using System . Collections . Generic ;
1819using Newtonsoft . Json ;
1920
2021namespace IBM . Watson . Assistant . v2 . Model
@@ -60,6 +61,15 @@ public class SearchResult
6061 /// </summary>
6162 [ JsonProperty ( "highlight" , NullValueHandling = NullValueHandling . Ignore ) ]
6263 public SearchResultHighlight Highlight { get ; set ; }
64+ /// <summary>
65+ /// An array specifying segments of text within the result that were identified as direct answers to the search
66+ /// query. Currently, only the single answer with the highest confidence (if any) is returned.
67+ ///
68+ /// **Note:** This property uses the answer finding beta feature, and is available only if the search skill is
69+ /// connected to a Discovery v2 service instance.
70+ /// </summary>
71+ [ JsonProperty ( "answers" , NullValueHandling = NullValueHandling . Ignore ) ]
72+ public List < SearchResultAnswer > Answers { get ; set ; }
6373 }
6474
6575}
Original file line number Diff line number Diff line change 1+ /**
2+ * (C) Copyright IBM Corp. 2021.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ *
16+ */
17+
18+ using Newtonsoft . Json ;
19+
20+ namespace IBM . Watson . Assistant . v2 . Model
21+ {
22+ /// <summary>
23+ /// An object specifing a segment of text that was identified as a direct answer to the search query.
24+ /// </summary>
25+ public class SearchResultAnswer
26+ {
27+ /// <summary>
28+ /// The text of the answer.
29+ /// </summary>
30+ [ JsonProperty ( "text" , NullValueHandling = NullValueHandling . Ignore ) ]
31+ public string Text { get ; set ; }
32+ /// <summary>
33+ /// The confidence score for the answer, as returned by the Discovery service.
34+ /// </summary>
35+ [ JsonProperty ( "confidence" , NullValueHandling = NullValueHandling . Ignore ) ]
36+ public double ? Confidence { get ; set ; }
37+ }
38+
39+ }
You can’t perform that action at this time.
0 commit comments