1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
|
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="dialogflow_v2.html">Dialogflow API</a> . <a href="dialogflow_v2.projects.html">projects</a> . <a href="dialogflow_v2.projects.conversations.html">conversations</a> . <a href="dialogflow_v2.projects.conversations.participants.html">participants</a> . <a href="dialogflow_v2.projects.conversations.participants.suggestions.html">suggestions</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#suggestArticles">suggestArticles(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets suggested articles for a participant based on specific historical messages.</p>
<p class="toc_element">
<code><a href="#suggestFaqAnswers">suggestFaqAnswers(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets suggested faq answers for a participant based on specific historical messages.</p>
<p class="toc_element">
<code><a href="#suggestKnowledgeAssist">suggestKnowledgeAssist(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets knowledge assist suggestions based on historical messages.</p>
<p class="toc_element">
<code><a href="#suggestSmartReplies">suggestSmartReplies(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets smart replies for a participant based on specific historical messages.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="suggestArticles">suggestArticles(parent, body=None, x__xgafv=None)</code>
<pre>Gets suggested articles for a participant based on specific historical messages.
Args:
parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Participants.SuggestArticles.
"assistQueryParams": { # Represents the parameters of human assist query. # Parameters for a human assist query.
"documentsMetadataFilters": { # Key-value filters on the metadata of documents returned by article suggestion. If specified, article suggestion only returns suggested documents that match all filters in their Document.metadata. Multiple values for a metadata key should be concatenated by comma. For example, filters to match all documents that have 'US' or 'CA' in their market metadata values and 'agent' in their user metadata values will be ``` documents_metadata_filters { key: "market" value: "US,CA" } documents_metadata_filters { key: "user" value: "agent" } ```
"a_key": "A String",
},
},
"contextSize": 42, # Optional. Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50.
"latestMessage": "A String", # Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Participants.SuggestArticles.
"articleAnswers": [ # Articles ordered by score in descending order.
{ # Represents article answer.
"answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/"
"confidence": 3.14, # Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
"metadata": { # A map that contains metadata about the answer and the document from which it originates.
"a_key": "A String",
},
"snippets": [ # Article snippets.
"A String",
],
"title": "A String", # The article title.
"uri": "A String", # The article URI.
},
],
"contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.
"latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.
}</pre>
</div>
<div class="method">
<code class="details" id="suggestFaqAnswers">suggestFaqAnswers(parent, body=None, x__xgafv=None)</code>
<pre>Gets suggested faq answers for a participant based on specific historical messages.
Args:
parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Participants.SuggestFaqAnswers.
"assistQueryParams": { # Represents the parameters of human assist query. # Parameters for a human assist query.
"documentsMetadataFilters": { # Key-value filters on the metadata of documents returned by article suggestion. If specified, article suggestion only returns suggested documents that match all filters in their Document.metadata. Multiple values for a metadata key should be concatenated by comma. For example, filters to match all documents that have 'US' or 'CA' in their market metadata values and 'agent' in their user metadata values will be ``` documents_metadata_filters { key: "market" value: "US,CA" } documents_metadata_filters { key: "user" value: "agent" } ```
"a_key": "A String",
},
},
"contextSize": 42, # Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
"latestMessage": "A String", # Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The request message for Participants.SuggestFaqAnswers.
"contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.
"faqAnswers": [ # Answers extracted from FAQ documents.
{ # Represents answer from "frequently asked questions".
"answer": "A String", # The piece of text from the `source` knowledge base document.
"answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/"
"confidence": 3.14, # The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
"metadata": { # A map that contains metadata about the answer and the document from which it originates.
"a_key": "A String",
},
"question": "A String", # The corresponding FAQ question.
"source": "A String", # Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.
},
],
"latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.
}</pre>
</div>
<div class="method">
<code class="details" id="suggestKnowledgeAssist">suggestKnowledgeAssist(parent, body=None, x__xgafv=None)</code>
<pre>Gets knowledge assist suggestions based on historical messages.
Args:
parent: string, Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Participants.SuggestKnowledgeAssist.
"contextSize": 42, # Optional. Max number of messages prior to and including latest_message to use as context when compiling the suggestion. The context size is by default 100 and at most 100.
"latestMessage": "A String", # Optional. The name of the latest conversation message to compile suggestions for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.
"previousSuggestedQuery": "A String", # Optional. The previously suggested query for the given conversation. This helps identify whether the next suggestion we generate is reasonably different from the previous one. This is useful to avoid similar suggestions within the conversation.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Participants.SuggestKnowledgeAssist.
"contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context_size field in the request if there are fewer messages in the conversation.
"knowledgeAssistAnswer": { # Represents a Knowledge Assist answer. # Output only. Knowledge Assist suggestion.
"answerRecord": "A String", # The name of the answer record. Format: `projects//locations//answer Records/`.
"suggestedQuery": { # Represents a suggested query. # The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion.
"queryText": "A String", # Suggested query text.
},
"suggestedQueryAnswer": { # Represents an answer from Knowledge. Currently supports FAQ and Generative answers. # The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query.
"answerText": "A String", # The piece of text from the `source` that answers this suggested query.
"faqSource": { # Details about source of FAQ answer. # Populated if the prediction came from FAQ.
"question": "A String", # The corresponding FAQ question.
},
"generativeSource": { # Details about source of Generative answer. # Populated if the prediction was Generative.
"snippets": [ # All snippets used for this Generative Prediction, with their source URI and data.
{ # Snippet Source for a Generative Prediction.
"metadata": { # Metadata of the document.
"a_key": "", # Properties of the object.
},
"text": "A String", # Text taken from that URI.
"title": "A String", # Title of the document.
"uri": "A String", # URI the data is sourced from.
},
],
},
},
},
"latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.
}</pre>
</div>
<div class="method">
<code class="details" id="suggestSmartReplies">suggestSmartReplies(parent, body=None, x__xgafv=None)</code>
<pre>Gets smart replies for a participant based on specific historical messages.
Args:
parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Participants.SuggestSmartReplies.
"contextSize": 42, # Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
"currentTextInput": { # Auxiliary proto messages. Represents the natural language text to be processed. # The current natural language text segment to compile suggestion for. This provides a way for user to get follow up smart reply suggestion after a smart reply selection, without sending a text message.
"languageCode": "A String", # Required. The language of this conversational query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
"text": "A String", # Required. The UTF-8 encoded natural language text to be processed. Text length must not exceed 256 characters for virtual agent interactions.
},
"latestMessage": "A String", # The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Participants.SuggestSmartReplies.
"contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation.
"latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.
"smartReplyAnswers": [ # Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.
{ # Represents a smart reply answer.
"answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/"
"confidence": 3.14, # Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
"reply": "A String", # The content of the reply.
},
],
}</pre>
</div>
</body></html>
|