Dialogflow API . projects . answerRecords

Instance Methods

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Deprecated. Retrieves a specific answer record.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Returns the list of all answer records in the specified project in reverse chronological order.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates the specified answer record.

Method Details

close()
Close httplib2 connections.
get(name, x__xgafv=None)
Deprecated. Retrieves a specific answer record.

Args:
  name: string, Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.
  "agentAssistantRecord": { # Represents a record of a human agent assistant answer. # Output only. The record for human agent assistant.
    "articleSuggestionAnswer": { # Represents article answer. # Output only. The article suggestion 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.
    },
    "faqAnswer": { # Represents answer from "frequently asked questions". # Output only. The FAQ answer.
      "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/`.
    },
  },
  "answerFeedback": { # Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. # Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
    "agentAssistantDetailFeedback": { # Detail feedback of Agent Assistant result. # Optional. Detail feedback of agent assistant suggestions.
      "answerRelevance": "A String", # Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT
      "documentCorrectness": "A String", # Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT
      "documentEfficiency": "A String", # Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
      "summarizationFeedback": { # Feedback for conversation summarization. # Feedback for conversation summarization.
        "startTimestamp": "A String", # Timestamp when composing of the summary starts.
        "submitTimestamp": "A String", # Timestamp when the summary was submitted.
        "summaryText": "A String", # Text of actual submitted summary.
      },
    },
    "clickTime": "A String", # Time when the answer/item was clicked.
    "clicked": True or False, # Indicates whether the answer/item was clicked by the human agent or not. Default to false.
    "correctnessLevel": "A String", # The correctness level of the specific answer.
    "displayTime": "A String", # Time when the answer/item was displayed.
    "displayed": True or False, # Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
  },
  "name": "A String", # The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Returns the list of all answer records in the specified project in reverse chronological order.

Args:
  parent: string, Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. (required)
  pageSize: integer, Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.
  pageToken: string, Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for AnswerRecords.ListAnswerRecords.
  "answerRecords": [ # The list of answer records.
    { # Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.
      "agentAssistantRecord": { # Represents a record of a human agent assistant answer. # Output only. The record for human agent assistant.
        "articleSuggestionAnswer": { # Represents article answer. # Output only. The article suggestion 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.
        },
        "faqAnswer": { # Represents answer from "frequently asked questions". # Output only. The FAQ answer.
          "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/`.
        },
      },
      "answerFeedback": { # Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. # Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
        "agentAssistantDetailFeedback": { # Detail feedback of Agent Assistant result. # Optional. Detail feedback of agent assistant suggestions.
          "answerRelevance": "A String", # Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT
          "documentCorrectness": "A String", # Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT
          "documentEfficiency": "A String", # Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
          "summarizationFeedback": { # Feedback for conversation summarization. # Feedback for conversation summarization.
            "startTimestamp": "A String", # Timestamp when composing of the summary starts.
            "submitTimestamp": "A String", # Timestamp when the summary was submitted.
            "summaryText": "A String", # Text of actual submitted summary.
          },
        },
        "clickTime": "A String", # Time when the answer/item was clicked.
        "clicked": True or False, # Indicates whether the answer/item was clicked by the human agent or not. Default to false.
        "correctnessLevel": "A String", # The correctness level of the specific answer.
        "displayTime": "A String", # Time when the answer/item was displayed.
        "displayed": True or False, # Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
      },
      "name": "A String", # The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.
    },
  ],
  "nextPageToken": "A String", # A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the ListAnswerRecordsRequest.page_token field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results.
}
list_next(previous_request, previous_response)
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.
    
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates the specified answer record.

Args:
  name: string, The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.
  "agentAssistantRecord": { # Represents a record of a human agent assistant answer. # Output only. The record for human agent assistant.
    "articleSuggestionAnswer": { # Represents article answer. # Output only. The article suggestion 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.
    },
    "faqAnswer": { # Represents answer from "frequently asked questions". # Output only. The FAQ answer.
      "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/`.
    },
  },
  "answerFeedback": { # Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. # Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
    "agentAssistantDetailFeedback": { # Detail feedback of Agent Assistant result. # Optional. Detail feedback of agent assistant suggestions.
      "answerRelevance": "A String", # Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT
      "documentCorrectness": "A String", # Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT
      "documentEfficiency": "A String", # Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
      "summarizationFeedback": { # Feedback for conversation summarization. # Feedback for conversation summarization.
        "startTimestamp": "A String", # Timestamp when composing of the summary starts.
        "submitTimestamp": "A String", # Timestamp when the summary was submitted.
        "summaryText": "A String", # Text of actual submitted summary.
      },
    },
    "clickTime": "A String", # Time when the answer/item was clicked.
    "clicked": True or False, # Indicates whether the answer/item was clicked by the human agent or not. Default to false.
    "correctnessLevel": "A String", # The correctness level of the specific answer.
    "displayTime": "A String", # Time when the answer/item was displayed.
    "displayed": True or False, # Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
  },
  "name": "A String", # The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.
}

  updateMask: string, Required. The mask to control which fields get updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.
  "agentAssistantRecord": { # Represents a record of a human agent assistant answer. # Output only. The record for human agent assistant.
    "articleSuggestionAnswer": { # Represents article answer. # Output only. The article suggestion 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.
    },
    "faqAnswer": { # Represents answer from "frequently asked questions". # Output only. The FAQ answer.
      "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/`.
    },
  },
  "answerFeedback": { # Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. # Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
    "agentAssistantDetailFeedback": { # Detail feedback of Agent Assistant result. # Optional. Detail feedback of agent assistant suggestions.
      "answerRelevance": "A String", # Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT
      "documentCorrectness": "A String", # Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT
      "documentEfficiency": "A String", # Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
      "summarizationFeedback": { # Feedback for conversation summarization. # Feedback for conversation summarization.
        "startTimestamp": "A String", # Timestamp when composing of the summary starts.
        "submitTimestamp": "A String", # Timestamp when the summary was submitted.
        "summaryText": "A String", # Text of actual submitted summary.
      },
    },
    "clickTime": "A String", # Time when the answer/item was clicked.
    "clicked": True or False, # Indicates whether the answer/item was clicked by the human agent or not. Default to false.
    "correctnessLevel": "A String", # The correctness level of the specific answer.
    "displayTime": "A String", # Time when the answer/item was displayed.
    "displayed": True or False, # Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
  },
  "name": "A String", # The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.
}