-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not call llm on empty prompt #614
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 === "") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic of the condition has been changed with the addition of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition
|
||
// cancelled | ||
return { status: prompt.status, statusText: prompt.statusText } | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check for an empty string in the condition
prompt.text === ""
might not be necessary ifprompt.status
is not "success". If the status is not "success", it implies that the operation failed or was cancelled, so the text might not be relevant in this context. 🤔