(promptBase, promptMatrix)
| 1661 | } |
| 1662 | |
| 1663 | function permutePrompts(promptBase, promptMatrix) { |
| 1664 | let prompts = [] |
| 1665 | let permutations = permute(promptMatrix) |
| 1666 | permutations.forEach((perm) => { |
| 1667 | let prompt = promptBase |
| 1668 | |
| 1669 | if (perm.length > 0) { |
| 1670 | let promptAddition = perm.join(", ") |
| 1671 | if (promptAddition.trim() === "") { |
| 1672 | return |
| 1673 | } |
| 1674 | |
| 1675 | prompt += ", " + promptAddition |
| 1676 | } |
| 1677 | |
| 1678 | prompts.push(prompt) |
| 1679 | }) |
| 1680 | |
| 1681 | return prompts |
| 1682 | } |
| 1683 | |
| 1684 | // create a file name with embedded prompt and metadata |
| 1685 | // for easier cateloging and comparison |
no test coverage detected