diff --git a/app/api/common.ts b/app/api/common.ts index e5afb4d89..cd2936ee3 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -20,6 +20,10 @@ export async function requestOpenai(req: NextRequest) { baseUrl = `${PROTOCOL}://${baseUrl}`; } + if (baseUrl.endsWith('/')) { + baseUrl = baseUrl.slice(0, -1); + } + console.log("[Proxy] ", openaiPath); console.log("[Base Url]", baseUrl); diff --git a/app/constant.ts b/app/constant.ts index 0a94eed4e..8b28af323 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -41,7 +41,7 @@ export const MAX_SIDEBAR_WIDTH = 500; export const MIN_SIDEBAR_WIDTH = 230; 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"; diff --git a/docs/faq-cn.md b/docs/faq-cn.md index e4aa1e774..f9463eb95 100644 --- a/docs/faq-cn.md +++ b/docs/faq-cn.md @@ -212,7 +212,8 @@ OpenAI 网站计费说明:https://openai.com/pricing#language-models OpenAI 根据 token 数收费,1000 个 token 通常可代表 750 个英文单词,或 500 个汉字。输入(Prompt)和输出(Completion)分别统计费用。 |模型|用户输入(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-32K|$0.06 / 1 千 tokens|$0.12 / 1 千 tokens|32768| diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6121e5847..3aba6370f 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "ChatGPT Next Web", - "version": "2.9.2" + "version": "2.9.3" }, "tauri": { "allowlist": {