[fix] fixed huburl
This commit is contained in:
@@ -194,7 +194,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
if(db.useStreaming && arg.useStreaming){
|
if(db.useStreaming && arg.useStreaming){
|
||||||
body.stream = true
|
body.stream = true
|
||||||
const da = ((!isTauri) && (!isNodeServer) && (!db.usePlainFetch))
|
const da = ((!isTauri) && (!isNodeServer) && (!db.usePlainFetch))
|
||||||
? await fetch(`/proxy2`, {
|
? await fetch(hubURL + `/proxy2`, {
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
headers: {
|
headers: {
|
||||||
"risu-header": encodeURIComponent(JSON.stringify(headers)),
|
"risu-header": encodeURIComponent(JSON.stringify(headers)),
|
||||||
|
|||||||
@@ -164,11 +164,8 @@ export function processScriptFull(char:character|groupChat, data:string, mode:Sc
|
|||||||
}
|
}
|
||||||
if(p1.startsWith('getvar')){
|
if(p1.startsWith('getvar')){
|
||||||
const v = p1.split("::")[1]
|
const v = p1.split("::")[1]
|
||||||
if(chatID !== -1){
|
const d =getVarChat(chatID)
|
||||||
const d =getVarChat(chatID)
|
return d[v] ?? "[Null]"
|
||||||
console.log(d)
|
|
||||||
return d[v] ?? "[Null]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(p1.startsWith('calc')){
|
if(p1.startsWith('calc')){
|
||||||
const v = p1.split("::")[1]
|
const v = p1.split("::")[1]
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ export async function globalFetch(url:string, arg:{plainFetchForce?:boolean,body
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arg.rawResponse){
|
if(arg.rawResponse){
|
||||||
const furl = `/proxy2`
|
const furl = ((!isTauri) && (!isNodeServer)) ? `${hubURL}/proxy2` : `/proxy2`
|
||||||
|
|
||||||
const da = await fetch(furl, {
|
const da = await fetch(furl, {
|
||||||
body: body,
|
body: body,
|
||||||
@@ -640,7 +640,7 @@ export async function globalFetch(url:string, arg:{plainFetchForce?:boolean,body
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const furl = `/proxy2`
|
const furl = ((!isTauri) && (!isNodeServer)) ? `${hubURL}/proxy2` : `/proxy2`
|
||||||
|
|
||||||
const da = await fetch(furl, {
|
const da = await fetch(furl, {
|
||||||
body: body,
|
body: body,
|
||||||
@@ -731,9 +731,11 @@ export function getUnpargeables(db:Database, uptype:'basename'|'pure' = 'basenam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
db.personas.map((v) => {
|
if(db.personas){
|
||||||
addUnparge(v.icon)
|
db.personas.map((v) => {
|
||||||
})
|
addUnparge(v.icon)
|
||||||
|
})
|
||||||
|
}
|
||||||
return unpargeable
|
return unpargeable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user