error is displayed in ui

pull/914/merge^2
sarfaraz siddiqui 2 months ago
parent bf8fcc9cde
commit 5b5d00719f

@ -215,7 +215,7 @@ def stream():
retriever = RetrieverCreator.create_retriever(retriever_name, question=question,
source=source, chat_history=history,
prompt=prompt, chunks=chunks,
gpt_model=settings.gpt_model)
gpt_model=gpt_model)
return Response(
stream_with_context(complete_stream(question, retriever,

@ -30,6 +30,12 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
state.preference.chunks,
(error) => {
console.error(error);
dispatch(
conversationSlice.actions.setError({
index: state.conversation.queries.length - 1,
error: error.data.message,
}),
);
},
(event) => {
const data = JSON.parse(event);

Loading…
Cancel
Save