mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
Merge branch 'main' of https://github.com/DirkSchlossmacher/ChatGPT-Next-Web-AdEx
This commit is contained in:
commit
0a64ab922a
@ -135,7 +135,7 @@ After forking the project, due to the limitations imposed by GitHub, you need to
|
|||||||
|
|
||||||
If you want to update instantly, you can check out the [GitHub documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to learn how to synchronize a forked project with upstream code.
|
If you want to update instantly, you can check out the [GitHub documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to learn how to synchronize a forked project with upstream code.
|
||||||
|
|
||||||
You can star or watch this project or follow author to get release notifictions in time.
|
You can star or watch this project or follow author to get release notifications in time.
|
||||||
|
|
||||||
## Access Password
|
## Access Password
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ export const MAX_SIDEBAR_WIDTH = 500;
|
|||||||
export const MIN_SIDEBAR_WIDTH = 230;
|
export const MIN_SIDEBAR_WIDTH = 230;
|
||||||
export const NARROW_SIDEBAR_WIDTH = 100;
|
export const NARROW_SIDEBAR_WIDTH = 100;
|
||||||
|
|
||||||
export const ACCESS_CODE_PREFIX = "ak-";
|
export const ACCESS_CODE_PREFIX = "nk-";
|
||||||
|
|
||||||
export const LAST_INPUT_KEY = "last-input";
|
export const LAST_INPUT_KEY = "last-input";
|
||||||
|
|
||||||
|
@ -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;
|
||||||
},
|
},
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
html {
|
html {
|
||||||
height: var(--full-height);
|
height: var(--full-height);
|
||||||
|
|
||||||
font-family: "Overpass, Noto Sans SC", "SF Pro SC", "SF Pro Text", "SF Pro Icons",
|
font-family: "Overpass", "Noto Sans SC", "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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,8 @@ OpenAI 网站计费说明:https://openai.com/pricing#language-models
|
|||||||
OpenAI 根据 token 数收费,1000 个 token 通常可代表 750 个英文单词,或 500 个汉字。输入(Prompt)和输出(Completion)分别统计费用。
|
OpenAI 根据 token 数收费,1000 个 token 通常可代表 750 个英文单词,或 500 个汉字。输入(Prompt)和输出(Completion)分别统计费用。
|
||||||
|模型|用户输入(Prompt)计费|模型输出(Completion)计费|每次交互最大 token 数|
|
|模型|用户输入(Prompt)计费|模型输出(Completion)计费|每次交互最大 token 数|
|
||||||
|----|----|----|----|
|
|----|----|----|----|
|
||||||
|gpt-3.5|$0.002 / 1 千 tokens|$0.002 / 1 千 tokens|4096|
|
|gpt-3.5-turbo|$0.0015 / 1 千 tokens|$0.002 / 1 千 tokens|4096|
|
||||||
|
|gpt-3.5-turbo-16K|$0.003 / 1 千 tokens|$0.004 / 1 千 tokens|16384|
|
||||||
|gpt-4|$0.03 / 1 千 tokens|$0.06 / 1 千 tokens|8192|
|
|gpt-4|$0.03 / 1 千 tokens|$0.06 / 1 千 tokens|8192|
|
||||||
|gpt-4-32K|$0.06 / 1 千 tokens|$0.12 / 1 千 tokens|32768|
|
|gpt-4-32K|$0.06 / 1 千 tokens|$0.12 / 1 千 tokens|32768|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user