Skip to content

Commit

Permalink
fix(chat): fixed response parsing for markdown responses
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Oct 3, 2023
1 parent 57e675d commit 34c4fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/embeddings-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ${promptText}
output
.trim()
.replace(/\r?\n/g, '\n')
.split(/(^|\n)(Answer:|Message-ID:)/gi)
.split(/(^|\n)(?:[*`]*)(Answer:|Message-ID:)(?:[*`]*)/gi)
.map(v => v.trim())
.filter(v => v)
.forEach(val => {
Expand Down

0 comments on commit 34c4fdd

Please sign in to comment.