askContexts method

  1. @override
Future<AskContextsResponse> askContexts(
  1. AskContextsRequest request
)
override

Agentic Retrieval Ask API for RAG.

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<AskContextsResponse> askContexts(AskContextsRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_askContexts case final askContexts?) {
    return askContexts(request);
  }
  throw UnsupportedError('askContexts');
}