feat(listLineOutputParser): handle unclosed tags

This commit is contained in:
ItzCrazyKns 2024-10-30 10:29:21 +05:30
parent 65d057a05e
commit 012dfa5a74
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class LineListOutputParser extends BaseOutputParser<string[]> {
const startKeyIndex = text.indexOf(`<${this.key}>`);
const endKeyIndex = text.indexOf(`</${this.key}>`);
if (startKeyIndex === -1 || endKeyIndex === -1) {
if (startKeyIndex === -1 && endKeyIndex === -1) {
return [];
}