1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="dialogflow_v2beta1.html">Dialogflow API</a> . <a href="dialogflow_v2beta1.projects.html">projects</a> . <a href="dialogflow_v2beta1.projects.locations.html">locations</a> . <a href="dialogflow_v2beta1.projects.locations.conversations.html">conversations</a> . <a href="dialogflow_v2beta1.projects.locations.conversations.participants.html">participants</a> . <a href="dialogflow_v2beta1.projects.locations.conversations.participants.suggestions.html">suggestions</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#suggestArticles">suggestArticles(parent, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time.</p> 83<p class="toc_element"> 84 <code><a href="#suggestFaqAnswers">suggestFaqAnswers(parent, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Gets suggested faq answers for a participant based on specific historical messages.</p> 86<p class="toc_element"> 87 <code><a href="#suggestSmartReplies">suggestSmartReplies(parent, body=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets smart replies for a participant based on specific historical messages.</p> 89<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="close">close()</code> 92 <pre>Close httplib2 connections.</pre> 93</div> 94 95<div class="method"> 96 <code class="details" id="suggestArticles">suggestArticles(parent, body=None, x__xgafv=None)</code> 97 <pre>Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time. 98 99Args: 100 parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required) 101 body: object, The request body. 102 The object takes the form of: 103 104{ # The request message for Participants.SuggestArticles. 105 "assistQueryParams": { # Represents the parameters of human assist query. # Optional. Parameters for a human assist query. 106 "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" } ``` 107 "a_key": "A String", 108 }, 109 }, 110 "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. 111 "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/`. 112} 113 114 x__xgafv: string, V1 error format. 115 Allowed values 116 1 - v1 error format 117 2 - v2 error format 118 119Returns: 120 An object of the form: 121 122 { # The response message for Participants.SuggestArticles. 123 "articleAnswers": [ # Output only. Articles ordered by score in descending order. 124 { # Represents article answer. 125 "answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/" 126 "metadata": { # A map that contains metadata about the answer and the document from which it originates. 127 "a_key": "A String", 128 }, 129 "snippets": [ # Output only. Article snippets. 130 "A String", 131 ], 132 "title": "A String", # The article title. 133 "uri": "A String", # The article URI. 134 }, 135 ], 136 "contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation. 137 "latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. 138}</pre> 139</div> 140 141<div class="method"> 142 <code class="details" id="suggestFaqAnswers">suggestFaqAnswers(parent, body=None, x__xgafv=None)</code> 143 <pre>Gets suggested faq answers for a participant based on specific historical messages. 144 145Args: 146 parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required) 147 body: object, The request body. 148 The object takes the form of: 149 150{ # The request message for Participants.SuggestFaqAnswers. 151 "assistQueryParams": { # Represents the parameters of human assist query. # Optional. Parameters for a human assist query. 152 "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" } ``` 153 "a_key": "A String", 154 }, 155 }, 156 "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. 157 "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/`. 158} 159 160 x__xgafv: string, V1 error format. 161 Allowed values 162 1 - v1 error format 163 2 - v2 error format 164 165Returns: 166 An object of the form: 167 168 { # The request message for Participants.SuggestFaqAnswers. 169 "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. 170 "faqAnswers": [ # Output only. Answers extracted from FAQ documents. 171 { # Represents answer from "frequently asked questions". 172 "answer": "A String", # The piece of text from the `source` knowledge base document. 173 "answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/" 174 "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). 175 "metadata": { # A map that contains metadata about the answer and the document from which it originates. 176 "a_key": "A String", 177 }, 178 "question": "A String", # The corresponding FAQ question. 179 "source": "A String", # Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. 180 }, 181 ], 182 "latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. 183}</pre> 184</div> 185 186<div class="method"> 187 <code class="details" id="suggestSmartReplies">suggestSmartReplies(parent, body=None, x__xgafv=None)</code> 188 <pre>Gets smart replies for a participant based on specific historical messages. 189 190Args: 191 parent: string, Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. (required) 192 body: object, The request body. 193 The object takes the form of: 194 195{ # The request message for Participants.SuggestSmartReplies. 196 "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. 197 "currentTextInput": { # 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. 198 "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. 199 "text": "A String", # Required. The UTF-8 encoded natural language text to be processed. Text length must not exceed 256 characters. 200 }, 201 "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/`. 202} 203 204 x__xgafv: string, V1 error format. 205 Allowed values 206 1 - v1 error format 207 2 - v2 error format 208 209Returns: 210 An object of the form: 211 212 { # The response message for Participants.SuggestSmartReplies. 213 "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. 214 "latestMessage": "A String", # The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. 215 "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. 216 { # Represents a smart reply answer. 217 "answerRecord": "A String", # The name of answer record, in the format of "projects//locations//answerRecords/" 218 "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). 219 "reply": "A String", # The content of the reply. 220 }, 221 ], 222}</pre> 223</div> 224 225</body></html>