Close httplib2 connections.
compile(parent, body=None, x__xgafv=None)
Deprecated. use SuggestArticles and SuggestFaqAnswers instead. Gets suggestions 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.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Deprecated: Use inline suggestion, event based suggestion or Suggestion* API instead. See HumanAgentAssistantConfig.name for more details. Removal Date: 2020-09-01. Retrieves suggestions for live agents. This method should be used by human agent client software to fetch auto generated suggestions in real-time, while the conversation with an end user is in progress. The functionality is implemented in terms of the [list pagination](https://cloud.google.com/apis/design/design_patterns#list_pagination) design pattern. The client app should use the `next_page_token` field to fetch the next batch of suggestions. `suggestions` are sorted by `create_time` in descending order. To fetch latest suggestion, just set `page_size` to 1. To fetch new suggestions without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.
Retrieves the next page of results.
suggestArticles(parent, body=None, x__xgafv=None)
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.
suggestFaqAnswers(parent, body=None, x__xgafv=None)
Gets suggested faq answers for a participant based on specific historical messages.
suggestKnowledgeAssist(parent, body=None, x__xgafv=None)
Gets knowledge assist suggestions based on historical messages.
suggestSmartReplies(parent, body=None, x__xgafv=None)
Gets smart replies for a participant based on specific historical messages.
close()
Close httplib2 connections.
compile(parent, body=None, x__xgafv=None)
Deprecated. use SuggestArticles and SuggestFaqAnswers instead. Gets suggestions 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. 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.CompileSuggestion. "contextSize": 42, # Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. If zero or less than zero, 20 is used. "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.CompileSuggestion. "contextSize": 42, # Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the CompileSuggestionRequest.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/`. "suggestion": { # Represents a suggestion for a human agent. # The compiled suggestion. "articles": [ # Output only. Articles ordered by score in descending order. { # Represents suggested article. "answerRecord": "A String", # Output only. The name of answer record, in the format of "projects//locations//answerRecords/" "metadata": { # Output only. A map that contains metadata about the answer and the document from which it originates. "a_key": "A String", }, "snippets": [ # Output only. Article snippets. "A String", ], "title": "A String", # Output only. The article title. "uri": "A String", # Output only. The article URI. }, ], "createTime": "A String", # Output only. The time the suggestion was created. "faqAnswers": [ # Output only. Answers extracted from FAQ documents. { # Represents suggested answer from "frequently asked questions". "answer": "A String", # Output only. The piece of text from the `source` knowledge base document. "answerRecord": "A String", # Output only. 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": { # Output only. A map that contains metadata about the answer and the document from which it originates. "a_key": "A String", }, "question": "A String", # Output only. The corresponding FAQ question. "source": "A String", # Output only. Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. }, ], "latestMessage": "A String", # Output only. Latest message used as context to compile this suggestion. Format: `projects//locations//conversations//messages/`. "name": "A String", # Output only. The name of this suggestion. Format: `projects//locations//conversations//participants/*/suggestions/`. }, }
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Deprecated: Use inline suggestion, event based suggestion or Suggestion* API instead. See HumanAgentAssistantConfig.name for more details. Removal Date: 2020-09-01. Retrieves suggestions for live agents. This method should be used by human agent client software to fetch auto generated suggestions in real-time, while the conversation with an end user is in progress. The functionality is implemented in terms of the [list pagination](https://cloud.google.com/apis/design/design_patterns#list_pagination) design pattern. The client app should use the `next_page_token` field to fetch the next batch of suggestions. `suggestions` are sorted by `create_time` in descending order. To fetch latest suggestion, just set `page_size` to 1. To fetch new suggestions without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token. Args: parent: string, Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`. (required) filter: string, Optional. Filter on suggestions fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > "2017-01-15T01:30:15.01Z"` For more information about filtering, see [API Filtering](https://aip.dev/160). pageSize: integer, Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000. pageToken: string, Optional. The next_page_token value returned from a previous list request. 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.ListSuggestions. "nextPageToken": "A String", # Optional. Token to retrieve the next page of results or empty if there are no more results in the list. "suggestions": [ # Required. The list of suggestions. There will be a maximum number of items returned based on the page_size field in the request. `suggestions` is sorted by `create_time` in descending order. { # Represents a suggestion for a human agent. "articles": [ # Output only. Articles ordered by score in descending order. { # Represents suggested article. "answerRecord": "A String", # Output only. The name of answer record, in the format of "projects//locations//answerRecords/" "metadata": { # Output only. A map that contains metadata about the answer and the document from which it originates. "a_key": "A String", }, "snippets": [ # Output only. Article snippets. "A String", ], "title": "A String", # Output only. The article title. "uri": "A String", # Output only. The article URI. }, ], "createTime": "A String", # Output only. The time the suggestion was created. "faqAnswers": [ # Output only. Answers extracted from FAQ documents. { # Represents suggested answer from "frequently asked questions". "answer": "A String", # Output only. The piece of text from the `source` knowledge base document. "answerRecord": "A String", # Output only. 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": { # Output only. A map that contains metadata about the answer and the document from which it originates. "a_key": "A String", }, "question": "A String", # Output only. The corresponding FAQ question. "source": "A String", # Output only. Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. }, ], "latestMessage": "A String", # Output only. Latest message used as context to compile this suggestion. Format: `projects//locations//conversations//messages/`. "name": "A String", # Output only. The name of this suggestion. Format: `projects//locations//conversations//participants/*/suggestions/`. }, ], }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
suggestArticles(parent, body=None, x__xgafv=None)
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. 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. # Optional. 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": [ # Output only. 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/" "metadata": { # A map that contains metadata about the answer and the document from which it originates. "a_key": "A String", }, "snippets": [ # Output only. 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 SuggestArticlesResponse.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/`. }
suggestFaqAnswers(parent, body=None, x__xgafv=None)
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. # Optional. 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": [ # Output only. 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/`. }
suggestKnowledgeAssist(parent, body=None, x__xgafv=None)
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 resonably 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/`. }
suggestSmartReplies(parent, body=None, x__xgafv=None)
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, # 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. "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. "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. }, ], }