🐛 fix bug in edit prompt

This commit is contained in:
Nate Sesti 2024-04-02 10:18:34 -07:00
parent 1d6b86708c
commit 63da98591e

View file

@ -86,7 +86,7 @@ const osModelsEditPrompt: PromptTemplate = (history, otherData) => {
}
// Use a different prompt when there's neither prefix nor suffix
if (otherData.prefix.trim() === "" && otherData.suffix.trim() === "") {
if (otherData.prefix?.trim() === "" && otherData.suffix?.trim() === "") {
return [
{
role: "user",