From 8b8702e04d33a84f3e4e1508870435d5a0867eb8 Mon Sep 17 00:00:00 2001 From: liuweiqing Date: Sat, 13 Apr 2024 15:47:23 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BC=BA=E5=88=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=88=91=E8=AE=BE=E7=BD=AE=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/QuillEditor.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/QuillEditor.tsx b/components/QuillEditor.tsx index 75895fc..b3aa196 100644 --- a/components/QuillEditor.tsx +++ b/components/QuillEditor.tsx @@ -29,6 +29,8 @@ import { useAppDispatch, useAppSelector } from "@/app/store"; import { addReferencesRedux, setEditorContent, + setApiKey, + setUpsreamUrl, } from "@/app/store/slices/authSlice"; import { setContentUpdatedFromNetwork } from "@/app/store/slices/stateSlice"; //类型声明 @@ -246,6 +248,11 @@ const QEditor = ({ lng }) => { ); } }, []); + // 强制更新为我设置的API + useEffect(() => { + dispatch(setApiKey("sk-GHuPUV6ERD8wVmmr36FeB8D809D34d93Bb857c009f6aF9Fe")); + dispatch(setUpsreamUrl("https://one.paperai.life")); + }); const handleTextChange = debounce(async function (delta, oldDelta, source) { if (source === "user") { // 获取编辑器内容