akemi/tailwind #1

Merged
chopper merged 4 commits from akemi/tailwind into main 2024-03-04 16:40:37 -07:00
2 changed files with 41 additions and 2 deletions
Showing only changes of commit bb219b3cad - Show all commits

View file

@ -6,5 +6,8 @@
"action": { "action": {
"default_popup": "src/main.html", "default_popup": "src/main.html",
"default_icon": "assets/logo.png" "default_icon": "assets/logo.png"
} },
"host_permissions": [
"http://localhost/*"
]
} }

View file

@ -1 +1,37 @@
console.log("Popup") const ollama_get_models = async () => {
const res = await fetch('http://localhost:11434/api/tags')
if (res.status !== 200) {
console.error("Failed to make request to Ollama")
return
}
const js = await res.json()
return js
}
const ollama_chat_complete = async (model, messages) => {
const body = {
model: "gemmachad:latest",
messages: { role: "user", content: "why is the sky blue?" },
stream: false
}
console.log(body)
const res = await fetch('http://localhost:11434/api/chat', {
Review

Currently I'm getting a 403 for this one... but not for ollama_get_models? Not sure what's up

Currently I'm getting a 403 for this one... but not for `ollama_get_models`? Not sure what's up
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body)
})
if (res.status !== 200) {
console.error("Failed to make request to Ollama")
return
}
const js = await res.json()
return js
}