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") { // 获取编辑器内容