Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

由于api key格式的变化,splitKeys函数里面的filter会直接滤掉现在的api key,现在要正常使用的话需要把这步过滤去掉或改成符合现在格式的形式 #258

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CLIENT_GLOBAL_SETTINGS={"APIKey":"","password":"","enterToSend":true}
CLIENT_SESSION_SETTINGS={"title":"","saveSession":true,"APITemperature":0.6,"continuousDialogue":true,"model":"gpt-3.5"}
CLIENT_DEFAULT_MESSAGE='Powered by OpenAI Vercel
- 点击每条消息前的头像,可以锁定对话,作为角色设定。[查看更多使用技巧](https://github.com/ourongxing/chatgpt-vercel#使用技巧)。
- 现在支持多个对话,打开对话设置,点击新建对话。在输入框里输入 [[/]][[/]] 或者 [[空格]][[空格]] 可以切换对话,搜索历史消息。
- [[Shift]] + [[Enter]] 换行。开头输入 [[/]] 或者 [[空格]] 搜索 Prompt 预设。[[↑]] 可编辑最近一次提问。点击顶部名称滚动到顶部,点击输入框滚动到底部。
'
CLIENT_MAX_INPUT_TOKENS={"gpt-3.5":16000,"gpt-4":32000}
OPENAI_API_BASE_URL=https://gtapi.xiaoerchaoren.com:8932
OPENAI_API_KEY=
TIMEOUT=30000
PASSWORD=
SEND_KEY=
SEND_CHANNEL=9
NO_GFW=false
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
CLIENT_GLOBAL_SETTINGS={"APIKey":"","password":"","enterToSend":true}
CLIENT_SESSION_SETTINGS={"title":"","saveSession":true,"APITemperature":0.6,"continuousDialogue":true,"model":"gpt-3.5"}
CLIENT_DEFAULT_MESSAGE='Powered by OpenAI Vercel
- 如果本项目对你有所帮助,可以给小猫 [买点零食](https://cdn.jsdelivr.net/gh/ourongxing/chatgpt-vercel/assets/reward.gif),但不接受任何付费功能请求。
- 本网站仅作为项目演示,不提供服务,请填入自己的 Key,长期使用请 [自行部署](https://github.com/ourongxing/chatgpt-vercel#%E9%83%A8%E7%BD%B2%E4%B8%80%E4%B8%AA%E4%BD%A0%E8%87%AA%E5%B7%B1%E7%9A%84-chatgpt-%E7%BD%91%E7%AB%99%E5%85%8D%E8%B4%B9),简单成本低。
- 点击每条消息前的头像,可以锁定对话,作为角色设定。[查看更多使用技巧](https://github.com/ourongxing/chatgpt-vercel#使用技巧)。
- 现在支持多个对话,打开对话设置,点击新建对话。在输入框里输入 [[/]][[/]] 或者 [[空格]][[空格]] 可以切换对话,搜索历史消息。
- [[Shift]] + [[Enter]] 换行。开头输入 [[/]] 或者 [[空格]] 搜索 Prompt 预设。[[↑]] 可编辑最近一次提问。点击顶部名称滚动到顶部,点击输入框滚动到底部。
'
CLIENT_MAX_INPUT_TOKENS={"gpt-3.5":16000,"gpt-4":32000}
OPENAI_API_BASE_URL=api.openai.com
OPENAI_API_BASE_URL=https://gtapi.xiaoerchaoren.com:8932
OPENAI_API_KEY=
TIMEOUT=30000
PASSWORD=
SEND_KEY=
SEND_CHANNEL=9
NO_GFW=false
NO_GFW=false
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export function splitKeys(keys: string) {
return keys
.trim()
.split(/\s*[\|\n]\s*/)
.filter(k => /sk-\w{48}/.test(k))
}

export function randomKey(keys: string[]) {
Expand Down