({
modelId,
slug,
}: {
modelId: string | null;
slug: string | null;
})
| 26 | export const RESPONSE_2_PLACEHOLDER = "Response 2"; |
| 27 | |
| 28 | export 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 |
| 48 | export type EvalKey = { |
no test coverage detected