Add support for setting the number of chunks processed per query

This commit is contained in:
Alex
2024-03-22 14:50:56 +00:00
parent add2db5b7a
commit ed08123550
7 changed files with 76 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
state.conversation.queries,
state.conversation.conversationId,
state.preference.prompt.id,
state.preference.chunks,
(event) => {
const data = JSON.parse(event.data);
@@ -51,6 +52,7 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
state.preference.selectedDocs!,
state.conversation.conversationId,
state.conversation.queries,
state.preference.chunks,
).then((sources) => {
//dispatch streaming sources
dispatch(
@@ -86,6 +88,7 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
state.conversation.queries,
state.conversation.conversationId,
state.preference.prompt.id,
state.preference.chunks,
);
if (answer) {
let sourcesPrepped = [];