Remove unused js method in web chat client, add newline to web data in prompt

This commit is contained in:
Debanjum Singh Solanky 2024-03-08 11:03:32 +05:30
parent 12d32ac99c
commit 446ac7649d
2 changed files with 2 additions and 26 deletions

View file

@ -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) {

View file

@ -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()