diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 6884c991..d5908ca3 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -246,7 +246,7 @@ export default function Conversation() { )} {queries.length > 0 ? ( -
+
{queries.map((query, index) => { return ( diff --git a/frontend/src/conversation/conversationSlice.ts b/frontend/src/conversation/conversationSlice.ts index 23962a28..10070a97 100644 --- a/frontend/src/conversation/conversationSlice.ts +++ b/frontend/src/conversation/conversationSlice.ts @@ -72,6 +72,23 @@ export const fetchAnswer = createAsyncThunk( query: { conversationId: data.id }, }), ); + handleSearch( + //search for sources post streaming + question, + state.preference.selectedDocs!, + state.conversation.conversationId, + state.conversation.queries, + state.preference.chunks, + state.preference.token_limit, + ).then((sources) => { + //dispatch streaming sources + dispatch( + updateStreamingSource({ + index: state.conversation.queries.length - 1, + query: { sources: sources ?? [] }, + }), + ); + }); } else if (data.type === 'error') { // set status to 'failed' dispatch(conversationSlice.actions.setStatus('failed'));