(modelId: string)
| 13 | |
| 14 | // If model is comparison model, this will return an empty array |
| 15 | export const getStringsToPrune = async (modelId: string) => { |
| 16 | if (isComparisonModel(modelId)) return []; |
| 17 | |
| 18 | const pruningRules = await prisma.pruningRule.findMany({ |
| 19 | where: { fineTuneId: modelId }, |
| 20 | select: { textToMatch: true }, |
| 21 | orderBy: [{ createdAt: "asc" }, { id: "asc" }], |
| 22 | }); |
| 23 | return pruningRules.map((rule) => rule.textToMatch); |
| 24 | }; |
| 25 | |
| 26 | export const pruneInputMessages = ( |
| 27 | messages: ChatCompletionMessageParam[], |
no test coverage detected