Dialogflow API . projects . locations . conversations . suggestions

Instance Methods

close()

Close httplib2 connections.

suggestConversationSummary(conversation, body=None, x__xgafv=None)

Suggest summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.

Method Details

close()
Close httplib2 connections.
suggestConversationSummary(conversation, body=None, x__xgafv=None)
Suggest summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.

Args:
  conversation: string, Required. The conversation to fetch suggestion for. Format: `projects//locations//conversations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Conversations.SuggestConversationSummary.
  "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, # Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000.
  "latestMessage": "A String", # The name of the latest conversation message used as context for compiling suggestion. If empty, the latest message of the conversation will be used. 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 Conversations.SuggestConversationSummary.
  "contextSize": 42, # Number of messages prior to and including last_conversation_message used to compile the suggestion. It may be smaller than the SuggestSummaryRequest.context_size field in the request if there weren't that many messages in the conversation.
  "latestMessage": "A String", # The name of the latest conversation message used as context for compiling suggestion. Format: `projects//locations//conversations//messages/`.
  "summary": { # Generated summary for a conversation. # Generated summary.
    "answerRecord": "A String", # The name of the answer record. Format: "projects//answerRecords/"
    "text": "A String", # The summary content that is concatenated into one string.
    "textSections": { # The summary content that is divided into sections. The key is the section's name and the value is the section's content. There is no specific format for the key or value.
      "a_key": "A String",
    },
  },
}