Close httplib2 connections.
suggestArticles(parent, body=None, x__xgafv=None)
Gets suggested articles for a participant based on specific historical messages.
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.
suggestArticles(parent, body=None, x__xgafv=None)
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/`. }
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. # 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/`. }
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, # 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. }, ], }