getBenchmarkHistory method

Future<HistoryOut?> getBenchmarkHistory({
  1. String? benchmark,
  2. String? model,
})

Returns each model's measured score per run over time, oldest first, with the change between runs.

Returns each model's measured score per run over time, oldest first, with the change between runs. This is the counterweight to a leaderboard: the board shows the latest run because that is what "how good is it" means, and a single latest number cannot distinguish a model that has always been strong from one that just improved, or from one that regressed after a provider changed something. Both matter for routing, and only one of them is visible on a board. Runs with no id — attempts recorded before runs existed — group under the empty run, which is honestly what they are: one undated measurement.

Parameters:

  • String benchmark: Benchmark is the catalog id to read, defaulting to gpqa_diamond.

  • String model: Model filters to one model. Empty returns every model measured.

Implementation

Future<HistoryOut?> getBenchmarkHistory({ String? benchmark, String? model, }) async {
  final response = await getBenchmarkHistoryWithHttpInfo( benchmark: benchmark, model: model, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HistoryOut',) as HistoryOut;

  }
  return null;
}