mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-20 04:37:09 +02:00
API support for Chat to have citations (#569)
This commit is contained in:
@@ -149,11 +149,9 @@ export const searchRequestStreamed = async ({
|
||||
|
||||
// These all come together
|
||||
if (Object.hasOwn(chunk, "top_documents")) {
|
||||
const topDocuments = chunk.top_documents as any[] | null;
|
||||
const topDocuments = chunk.top_documents as DanswerDocument[] | null;
|
||||
if (topDocuments) {
|
||||
relevantDocuments = topDocuments.map(
|
||||
(doc) => JSON.parse(doc) as DanswerDocument
|
||||
);
|
||||
relevantDocuments = topDocuments;
|
||||
updateDocs(relevantDocuments);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user