Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2585 from Yidadaa/bugfix-0808
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa authored Aug 8, 2023
2 parents c41c498 + b14c5cd commit 9420fd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export async function requestOpenai(req: NextRequest) {
},
method: req.method,
body: req.body,
// to fix #2485: https://stackoverflow.com/questions/55920957/cloudflare-worker-typeerror-one-time-use-body
redirect: "manual",
// @ts-ignore
duplex: "half",
signal: controller.signal,
Expand Down
4 changes: 2 additions & 2 deletions app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export const useChatStore = create<ChatStore>()(
},
onError(error) {
const isAborted = error.message.includes("aborted");
botMessage.content =
botMessage.content +=
"\n\n" +
prettyObject({
error: true,
Expand Down Expand Up @@ -553,7 +553,7 @@ export const useChatStore = create<ChatStore>()(
date: "",
}),
),
config: { ...modelConfig, stream: true },
config: { ...modelConfig, stream: true, model: "gpt-3.5-turbo" },
onUpdate(message) {
session.memoryPrompt = message;
},
Expand Down

0 comments on commit 9420fd4

Please sign in to comment.