This commit is contained in:
GH Action - Upstream Sync 2023-08-09 01:17:19 +00:00
commit 75edcd3a9f
4 changed files with 6 additions and 5 deletions

View File

@ -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,

View File

@ -104,8 +104,7 @@ const loadAsyncGoogleFont = () => {
getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl; getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
linkEl.rel = "stylesheet"; linkEl.rel = "stylesheet";
linkEl.href = linkEl.href =
googleFontUrl + googleFontUrl + "/css2?family=Noto+Sans:wght@300;400;700;900&display=swap";
"/css2?family=Noto+Sans+SC:wght@300;400;700;900&display=swap";
document.head.appendChild(linkEl); document.head.appendChild(linkEl);
}; };

View File

@ -332,7 +332,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,
@ -553,7 +553,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;
}, },

View File

@ -89,7 +89,7 @@
html { html {
height: var(--full-height); height: var(--full-height);
font-family: "Noto Sans SC", "SF Pro SC", "SF Pro Text", "SF Pro Icons", font-family: "Noto Sans", "SF Pro SC", "SF Pro Text", "SF Pro Icons",
"PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif; "PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
} }