MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / buildModelRadarChartUrl

Function buildModelRadarChartUrl

scripts/discord-sample.ts:343–360  ·  view source on GitHub ↗

* Builds a shareable QuickChart radar chart URL for a model's per-metric scores. * Currently unused in the Discord webhook, but retained for future scorecard embeds.

(
  model: ModelSummary,
  evalName: string,
)

Source from the content-addressed store, hash-verified

341 * Currently unused in the Discord webhook, but retained for future scorecard embeds.
342 */
343function buildModelRadarChartUrl(
344 model: ModelSummary,
345 evalName: string,
346): string | undefined {
347 if (model.rows.length === 0) {
348 return undefined;
349 }
350
351 return buildRadarChartUrl(
352 {
353 labels: model.rows.map((row) => row.name),
354 values: model.rows.map((row) => Number(row.average.toFixed(3))),
355 title: `${evalName} • ${model.id}`,
356 datasetLabel: model.id,
357 },
358 { includeBackground: true, backgroundColor: "white" },
359 );
360}
361
362function computeAverageScore(model: ModelSummary): number {
363 if (model.rows.length === 0) {

Callers

nothing calls this directly

Calls 1

buildRadarChartUrlFunction · 0.85

Tested by

no test coverage detected