generateInstanceRubrics method

Generates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations.

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

Future<GenerateInstanceRubricsResponse> generateInstanceRubrics(
  GenerateInstanceRubricsRequest request,
) async {
  final url = _endPoint.replace(
    path: '/v1beta1/${request.location}:generateInstanceRubrics',
  );
  final response = await _client.post(url, body: request);
  return GenerateInstanceRubricsResponse.fromJson(response);
}