feat(listLineOutputParser): handle unclosed tags
This commit is contained in:
parent
65d057a05e
commit
012dfa5a74
|
@ -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 [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue