mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 05:39:11 +00:00
Remove unused js method in web chat client, add newline to web data in prompt
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user