Skip to content

Commit 54021a8

Browse files
committed
remove placeholders if no content
1 parent e2ef098 commit 54021a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/src/templates/strings.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ export async function formatPrompt(
9595
}
9696

9797
for (const varName of placeholderValues) {
98-
if (toInject[varName]) {
99-
prompt = prompt.replaceAll(varName, toInject[varName])
100-
}
98+
prompt = prompt.replaceAll(varName, toInject[varName] ?? '')
10199
}
102100
return prompt
103101
}

0 commit comments

Comments
 (0)