From a1eeda4dd0b28ec4c63026a372f2560120651ca4 Mon Sep 17 00:00:00 2001 From: pelikhan Date: Mon, 12 Aug 2024 07:27:36 -0700 Subject: [PATCH] do not call llm on empty prompt --- packages/core/src/expander.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/expander.ts b/packages/core/src/expander.ts index b9b8728b73..92a84fcf2f 100644 --- a/packages/core/src/expander.ts +++ b/packages/core/src/expander.ts @@ -220,7 +220,7 @@ export async function expandTemplate( if (prompt.aici) trace.fence(prompt.aici, "yaml") trace.endDetails() - if (prompt.status !== "success") + if (prompt.status !== "success" || prompt.text === "") // cancelled return { status: prompt.status, statusText: prompt.statusText }