diff --git a/lightrag/api/static/index.html b/lightrag/api/static/index.html index e89f7d91..2a0dee71 100644 --- a/lightrag/api/static/index.html +++ b/lightrag/api/static/index.html @@ -566,30 +566,6 @@ } } - // Query Handler - async function handleQuery(query) { - queryResponse.innerHTML = '
Processing query...
'; - - try { - const response = await fetch('/query', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${localStorage.getItem('apiKey')}` - }, - body: JSON.stringify({ query }) - }); - - if (response.ok) { - const data = await response.json(); - queryResponse.innerHTML = marked.parse(data.response); - } else { - throw new Error('Failed to process query'); - } - } catch (error) { - queryResponse.innerHTML = `Error: ${error.message}
`; - } - } // Form submission handlers uploadForm.addEventListener('submit', async (e) => { @@ -602,16 +578,6 @@ } }); - queryForm.addEventListener('submit', async (e) => { - e.preventDefault(); - const query = queryInput.value.trim(); - if (query) { - await handleQuery(query); - } else { - queryResponse.innerHTML = 'Please enter a query
'; - } - }); - // Initialize document.addEventListener('DOMContentLoaded', () => { const apiKey = localStorage.getItem('apiKey');