MCPcopy
hub / github.com/OpenPipe/OpenPipe / getModelTitle

Function getModelTitle

app/src/server/tasks/evaluateTestSetEntries.task.ts:28–45  ·  view source on GitHub ↗
({
  modelId,
  slug,
}: {
  modelId: string | null;
  slug: string | null;
})

Source from the content-addressed store, hash-verified

26export const RESPONSE_2_PLACEHOLDER = "Response 2";
27
28export const getModelTitle = ({
29 modelId,
30 slug,
31}: {
32 modelId: string | null;
33 slug: string | null;
34}): string => {
35 if (modelId === ORIGINAL_MODEL_ID) {
36 return "the original model";
37 }
38 if (modelId && isComparisonModel(modelId)) {
39 return getComparisonModelName(modelId as ComparisonModel) as string;
40 }
41 if (slug) {
42 return `openpipe:${slug}`;
43 }
44 throw new Error("Model title not found");
45};
46
47// Accept result criteria instead of ids to recover from duplicate result creation attempts
48export type EvalKey = {

Callers 1

Calls 2

isComparisonModelFunction · 0.90
getComparisonModelNameFunction · 0.90

Tested by

no test coverage detected