Create index.html

This commit is contained in:
The Ghost of FOSS' Future 2024-08-22 20:34:35 +00:00 committed by GitHub
commit d04d0448c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

20
index.html Normal file
View file

@ -0,0 +1,20 @@
<head><title>Sneed Agent Demo.</title></head>
<body>
<script>
const hostname = "https://llm-api.nodemixaholic.com"
const q = prompt("Please enter q query.", "Hello!")
const www = prompt("Optionally, put in a URL for context.")
let url = `${hostname}/?q=${encodeURIComponent(`"${q}"`)}&www=${encodeURIComponent(`${www}`)}`
console.log(url)
// Fetch the results
fetch(String(url))
.then(response => response.text())
.then(result => {
// Set the body content to the generated SPL text
document.body.innerText = `${result}`;
})
.catch(error => console.error('Error fetching result:', error));
</script>
</body>