Spaces:
Running
Running
simplify prompt array parsing in preprocessing of prompt
Browse files
sketch.js
CHANGED
|
@@ -27,8 +27,7 @@ async function textGenTask(pre, prompt, blanks){
|
|
| 27 |
|
| 28 |
// fill in blanks from our sample prompt and make new prompts using our variable list 'blanksArray'
|
| 29 |
blanks.forEach(b => {
|
| 30 |
-
|
| 31 |
-
let p = prompt.replace('[BLANK]', b.value()) // replace the string segment with an item from the blanksArray
|
| 32 |
promptArray.push(p) // add the new prompt to the list we created
|
| 33 |
})
|
| 34 |
|
|
|
|
| 27 |
|
| 28 |
// fill in blanks from our sample prompt and make new prompts using our variable list 'blanksArray'
|
| 29 |
blanks.forEach(b => {
|
| 30 |
+
let p = prompt.replace('[BLANK]', b) // replace the string segment with an item from the blanksArray
|
|
|
|
| 31 |
promptArray.push(p) // add the new prompt to the list we created
|
| 32 |
})
|
| 33 |
|