Add deleteChatHistory method to PageAssitDatabase class and systemPromptForNonRagOption functions to ollama service

This commit is contained in:
n4ze3m
2024-02-07 21:07:41 +05:30
parent c1efb2d5cb
commit b54527cab5
14 changed files with 393 additions and 66 deletions

View File

@@ -79,6 +79,14 @@ export class PageAssitDatabase {
async clear() {
this.db.clear()
}
async deleteChatHistory() {
const chatHistories = await this.getChatHistories()
for (const history of chatHistories) {
this.db.remove(history.id)
}
this.db.remove("chatHistories")
}
}
const generateID = () => {