mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-27 16:10:16 +09:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
987598f30d
@ -43,6 +43,8 @@ export async function requestOpenai(req: NextRequest) {
|
|||||||
},
|
},
|
||||||
method: req.method,
|
method: req.method,
|
||||||
body: req.body,
|
body: req.body,
|
||||||
|
// to fix #2485: https://stackoverflow.com/questions/55920957/cloudflare-worker-typeerror-one-time-use-body
|
||||||
|
redirect: "manual",
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
duplex: "half",
|
duplex: "half",
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
|
@ -353,7 +353,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
},
|
},
|
||||||
onError(error) {
|
onError(error) {
|
||||||
const isAborted = error.message.includes("aborted");
|
const isAborted = error.message.includes("aborted");
|
||||||
botMessage.content =
|
botMessage.content +=
|
||||||
"\n\n" +
|
"\n\n" +
|
||||||
prettyObject({
|
prettyObject({
|
||||||
error: true,
|
error: true,
|
||||||
@ -405,7 +405,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
},
|
},
|
||||||
onError(error) {
|
onError(error) {
|
||||||
const isAborted = error.message.includes("aborted");
|
const isAborted = error.message.includes("aborted");
|
||||||
botMessage.content =
|
botMessage.content +=
|
||||||
"\n\n" +
|
"\n\n" +
|
||||||
prettyObject({
|
prettyObject({
|
||||||
error: true,
|
error: true,
|
||||||
@ -627,7 +627,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
date: "",
|
date: "",
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
config: { ...modelConfig, stream: true },
|
config: { ...modelConfig, stream: true, model: "gpt-3.5-turbo" },
|
||||||
onUpdate(message) {
|
onUpdate(message) {
|
||||||
session.memoryPrompt = message;
|
session.memoryPrompt = message;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user