mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
Randomize the thinking words
This commit is contained in:
parent
ea455cfa81
commit
67f363a2d1
1 changed files with 12 additions and 2 deletions
|
|
@ -143,7 +143,7 @@ window.addEventListener("load", (e) => {
|
|||
});
|
||||
|
||||
document.querySelector("#generate-project-idea").addEventListener("click", async (e) => {
|
||||
document.querySelector('#project-idea').innerText = "Thinking..."
|
||||
document.querySelector('#project-idea').innerText = thinkingWords() + "..."
|
||||
const res = await fetch('/api/bin/openai/', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -154,4 +154,14 @@ window.addEventListener("load", (e) => {
|
|||
const json = await res.json()
|
||||
document.querySelector('#project-idea').innerText = json.recommendation
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
function thinkingWords() {
|
||||
const arr = [
|
||||
"thinking",
|
||||
"single neuron activated",
|
||||
"quantum computing",
|
||||
"thinking about trash",
|
||||
"wishing you a garbage day"]
|
||||
return arr[Math.floor(Math.random() * arr.length)]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue