mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Remove unused js method in web chat client, add newline to web data in prompt
This commit is contained in:
parent
12d32ac99c
commit
446ac7649d
2 changed files with 2 additions and 26 deletions
|
@ -1070,31 +1070,6 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||
});
|
||||
}
|
||||
|
||||
function clearConversationHistory() {
|
||||
let chatInput = document.getElementById("chat-input");
|
||||
let originalPlaceholder = chatInput.placeholder;
|
||||
let chatBody = document.getElementById("chat-body");
|
||||
let conversationId = chatBody.dataset.conversationId;
|
||||
|
||||
let deleteURL = `/api/chat/history?client=web`;
|
||||
if (conversationId) {
|
||||
deleteURL += `&conversation_id=${conversationId}`;
|
||||
}
|
||||
|
||||
fetch(deleteURL , { method: "DELETE" })
|
||||
.then(response => response.ok ? response.json() : Promise.reject(response))
|
||||
.then(data => {
|
||||
chatBody.innerHTML = "";
|
||||
chatBody.dataset.conversationId = "";
|
||||
chatBody.dataset.conversationTitle = "";
|
||||
loadChat();
|
||||
flashStatusInChatInput("🗑 Cleared conversation history");
|
||||
})
|
||||
.catch(err => {
|
||||
flashStatusInChatInput("⛔️ Failed to clear conversation history");
|
||||
});
|
||||
}
|
||||
|
||||
let sendMessageTimeout;
|
||||
let mediaRecorder;
|
||||
function speechToText(event) {
|
||||
|
|
|
@ -296,7 +296,8 @@ extract_relevant_information = PromptTemplate.from_template(
|
|||
"""
|
||||
Target Query: {query}
|
||||
|
||||
Web Pages: {corpus}
|
||||
Web Pages:
|
||||
{corpus}
|
||||
|
||||
Collate the relevant information from the website to answer the target query.
|
||||
""".strip()
|
||||
|
|
Loading…
Reference in a new issue