[fix] apply plain fetch option when use Streaming (#201)

# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [x] Did you added a type def?

# Description
Apply plain fetch option when use Streaming
This commit is contained in:
kwaroran
2023-07-11 21:19:20 +09:00
committed by GitHub

View File

@@ -193,7 +193,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)) const da = ((!isTauri) && (!isNodeServer) && (!db.usePlainFetch))
? await fetch(`/proxy2`, { ? await fetch(`/proxy2`, {
body: JSON.stringify(body), body: JSON.stringify(body),
headers: { headers: {