queryDocument method

  1. @override
Future<QueryDocumentResponse> queryDocument(
  1. QueryDocumentRequest request
)
override

Performs semantic search over a Document.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<QueryDocumentResponse> queryDocument(
  QueryDocumentRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_queryDocument case final queryDocument?) {
    return queryDocument(request);
  }
  throw UnsupportedError('queryDocument');
}