retrieve method

Future<RetrieveResponse> retrieve({
  1. required String assistantId,
  2. required RetrievalConfiguration retrievalConfiguration,
  3. required String retrievalQuery,
})

Retrieves content from knowledge sources based on a query.

May throw AccessDeniedException. May throw ConflictException. May throw DependencyFailedException. May throw RequestTimeoutException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter assistantId : The identifier of the Amazon Q in Connect assistant for content retrieval.

Parameter retrievalConfiguration : The configuration for the content retrieval operation.

Parameter retrievalQuery : The query for content retrieval.

Implementation

Future<RetrieveResponse> retrieve({
  required String assistantId,
  required RetrievalConfiguration retrievalConfiguration,
  required String retrievalQuery,
}) async {
  final $payload = <String, dynamic>{
    'retrievalConfiguration': retrievalConfiguration,
    'retrievalQuery': retrievalQuery,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/assistants/${Uri.encodeComponent(assistantId)}/retrieve',
    exceptionFnMap: _exceptionFns,
  );
  return RetrieveResponse.fromJson(response);
}