Closed felipeotarola closed 8 months ago
I think doing this on the frontend may fix it?
To fix that at components/ChatWindow.tsx
line 45
you need to replace atob(sourcesHeader)
with (Buffer.from(sourcesHeader, 'base64')).toString('utf8')
The problem with atob function
Would you be up for opening a PR?
@AlexBSoft Perfect, this was a nice solution, I build an entire function lto make it work :D.
function base64Decode(str:any) { return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); }
the text that are displayed as source is not rendered in UTF8 All of the rest of the text is correctly formatted,
I have added "Content-Type": "application/json; charset=utf-8", to the StreamingTextResponse in retrival/route but that didn't help,
Any ideas?