Skip to content

Commit 15d650b

Browse files
committed
fix: 修改密钥后无法接口无法正常获取
1 parent 2635802 commit 15d650b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/app/core/setting/setting-ai.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function SettingAI({id, icon}: {id: string, icon?: React.ReactNode}) {
6464
const value = e.target.value
6565
setApiKey(value)
6666
const store = await Store.load('store.json');
67-
console.log(aiType);
67+
await store.set(`apiKey`, value)
6868
await store.set(`apiKey-${aiType}`, value)
6969
}
7070

src/lib/ai.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ async function createAi(text: string) {
1010
const model = await store.get('model')
1111

1212
const headers = new Headers();
13+
console.log(apiKey);
1314
headers.append("Authorization", `Bearer ${apiKey}`);
1415
headers.append("Content-Type", "application/json");
1516

0 commit comments

Comments
 (0)