def get_answer_record( self, request: answer_record.GetAnswerRecordRequest = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> answer_record.AnswerRecord: r"""Deprecated. Retrieves a specific answer record. Args: request (google.cloud.dialogflow_v2beta1.types.GetAnswerRecordRequest): The request object. Request message for [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.dialogflow_v2beta1.types.AnswerRecord: 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][google.cloud.dialogflow.v2beta1.AnswerRecord.name] are returned to the customers. 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] to call the [UpdateAnswerRecord][] method to send feedback about a specific answer that they believe is wrong. """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes # in a answer_record.GetAnswerRecordRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, answer_record.GetAnswerRecordRequest): request = answer_record.GetAnswerRecordRequest(request) # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = self._transport._wrapped_methods[ self._transport.get_answer_record] # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata( (("name", request.name), )), ) # Send the request. response = rpc( request, retry=retry, timeout=timeout, metadata=metadata, ) # Done; return the response. return response
async def get_answer_record( self, request: Union[answer_record.GetAnswerRecordRequest, dict] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> answer_record.AnswerRecord: r"""Deprecated. Retrieves a specific answer record. .. code-block:: python from google.cloud import dialogflow_v2beta1 async def sample_get_answer_record(): # Create a client client = dialogflow_v2beta1.AnswerRecordsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetAnswerRecordRequest( ) # Make the request response = await client.get_answer_record(request=request) # Handle the response print(response) Args: request (Union[google.cloud.dialogflow_v2beta1.types.GetAnswerRecordRequest, dict]): The request object. Request message for [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.dialogflow_v2beta1.types.AnswerRecord: 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][google.cloud.dialogflow.v2beta1.AnswerRecord.name] are returned to the customers. 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2beta1.AnswerRecord.name] to call the [UpdateAnswerRecord][] method to send feedback about a specific answer that they believe is wrong. """ warnings.warn( "AnswerRecordsAsyncClient.get_answer_record is deprecated", DeprecationWarning, ) # Create or coerce a protobuf request object. request = answer_record.GetAnswerRecordRequest(request) # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = gapic_v1.method_async.wrap_method( self._client._transport.get_answer_record, default_timeout=None, client_info=DEFAULT_CLIENT_INFO, ) # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata( (("name", request.name), )), ) # Send the request. response = await rpc( request, retry=retry, timeout=timeout, metadata=metadata, ) # Done; return the response. return response