feat: the format of key is now constant with that of OpenAI

This commit is contained in:
JustSong
2023-06-03 10:53:25 +08:00
parent 98f1a627f0
commit 2847a08852
4 changed files with 29 additions and 4 deletions

View File

@@ -238,11 +238,12 @@ const TokensTable = () => {
size={'small'}
positive
onClick={async () => {
if (await copy(token.key)) {
let key = "sk-" + token.key;
if (await copy(key)) {
showSuccess('已复制到剪贴板!');
} else {
showWarning('无法复制到剪贴板,请手动复制,已将令牌填入搜索框。');
setSearchKeyword(token.key);
setSearchKeyword(key);
}
}}
>