Refactor conversationSlice.ts and conversationApi.ts

This commit is contained in:
Alex
2024-03-28 13:43:10 +00:00
parent e146922367
commit 97fabf51b8
4 changed files with 78 additions and 48 deletions

View File

@@ -23,7 +23,6 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
await fetchAnswerSteaming(
question,
signal,
state.preference.apiKey,
state.preference.selectedDocs!,
state.conversation.queries,
state.conversation.conversationId,
@@ -47,7 +46,6 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
searchEndpoint(
//search for sources post streaming
question,
state.preference.apiKey,
state.preference.selectedDocs!,
state.conversation.conversationId,
state.conversation.queries,
@@ -81,7 +79,6 @@ export const fetchAnswer = createAsyncThunk<Answer, { question: string }>(
const answer = await fetchAnswerApi(
question,
signal,
state.preference.apiKey,
state.preference.selectedDocs!,
state.conversation.queries,
state.conversation.conversationId,