chore: 强制更新我设置的api

This commit is contained in:
liuweiqing 2024-04-13 15:47:23 +08:00
parent fe43130b4f
commit 8b8702e04d

View File

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