This commit is contained in:
shadowcz007
2024-08-02 18:32:27 +08:00
parent edd0303f59
commit 76a9da7163
6 changed files with 213 additions and 70 deletions
+10 -1
View File
@@ -1,4 +1,9 @@
function get_url () {
// 如果有缓存记录
let hostUrl = localStorage.getItem('_hostUrl') || ''
if (hostUrl) {
return hostUrl
}
let api_host = `${window.location.hostname}:${window.location.port}`
let api_base = ''
let url = `${window.location.protocol}//${api_host}${api_base}`
@@ -143,8 +148,12 @@ function queuePromptNew (filename, category, seed, input, client_id) {
// 随机seed
// promptWorkflow = randomSeed(seed, promptWorkflow);
let d = { filename, category, seed, input, client_id }
if (apps) {
d.apps = apps
}
const data = JSON.stringify({ filename, category, seed, input, client_id })
const data = JSON.stringify(d)
return new Promise((res, rej) => {
fetch(`${url}/mixlab/prompt`, {
method: 'POST',