mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
fix(conv): /search after setting id
This commit is contained in:
@@ -246,7 +246,7 @@ export default function Conversation() {
|
||||
)}
|
||||
|
||||
{queries.length > 0 ? (
|
||||
<div className="w-full md:w-8/12 px-1">
|
||||
<div className="w-full md:w-8/12">
|
||||
{queries.map((query, index) => {
|
||||
return (
|
||||
<Fragment key={index}>
|
||||
|
||||
@@ -72,6 +72,23 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
|
||||
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'));
|
||||
|
||||
Reference in New Issue
Block a user