uploadRagFile method

  1. @override
Future<UploadRagFileResponse> uploadRagFile(
  1. UploadRagFileRequest request
)
override

Upload a file into a RagCorpus.

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<UploadRagFileResponse> uploadRagFile(
  UploadRagFileRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_uploadRagFile case final uploadRagFile?) {
    return uploadRagFile(request);
  }
  throw UnsupportedError('uploadRagFile');
}