mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-05-01 00:32:38 +00:00
feat(listLineOutputParser): handle unclosed tags
This commit is contained in:
@ -23,7 +23,7 @@ class LineListOutputParser extends BaseOutputParser<string[]> {
|
|||||||
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
||||||
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
||||||
|
|
||||||
if (startKeyIndex === -1 || endKeyIndex === -1) {
|
if (startKeyIndex === -1 && endKeyIndex === -1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user