mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-02 18:13:13 +00:00
history init
This commit is contained in:
@@ -7,6 +7,7 @@ export function fetchAnswerApi(
|
||||
question: string,
|
||||
apiKey: string,
|
||||
selectedDocs: Doc,
|
||||
history: Array<any> = [],
|
||||
): Promise<Answer> {
|
||||
let namePath = selectedDocs.name;
|
||||
if (selectedDocs.language === namePath) {
|
||||
@@ -37,7 +38,7 @@ export function fetchAnswerApi(
|
||||
question: question,
|
||||
api_key: apiKey,
|
||||
embeddings_key: apiKey,
|
||||
history: localStorage.getItem('chatHistory'),
|
||||
history: history,
|
||||
active_docs: docPath,
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -19,6 +19,7 @@ export const fetchAnswer = createAsyncThunk<
|
||||
question,
|
||||
state.preference.apiKey,
|
||||
state.preference.selectedDocs!,
|
||||
state.conversation.queries,
|
||||
);
|
||||
return answer;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user