mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-30 14:25:19 +01:00
feat: includes sources
This commit is contained in:
parent
a451574760
commit
30936573ac
6 changed files with 49 additions and 9 deletions
|
|
@ -6,8 +6,8 @@ const getCitations = (res) => {
|
|||
if (!textBlocks) return '';
|
||||
let links = textBlocks[textBlocks.length - 1]?.text.match(regex);
|
||||
if (links?.length === 0 || !links) return '';
|
||||
links = links.map((link) => '- ' + link.trim());
|
||||
return 'Learn more:\n' + links.join('\n');
|
||||
links = links.map((link) => link.trim());
|
||||
return links.join('\n');
|
||||
};
|
||||
|
||||
module.exports = getCitations;
|
||||
Loading…
Add table
Add a link
Reference in a new issue