mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 05:19:51 +00:00
fix: refresh page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { connectToDatabase } from '@/service/mongo';
|
||||
import { authUser, authModel, getApiKey, authShareChat, type AuthType } from '@/service/utils/auth';
|
||||
import { authUser, authModel, getApiKey, authShareChat } from '@/service/utils/auth';
|
||||
import { modelServiceToolMap, V2_StreamResponse } from '@/service/utils/chat';
|
||||
import { jsonRes } from '@/service/response';
|
||||
import { ChatModelMap } from '@/constants/model';
|
||||
|
@@ -156,6 +156,7 @@ const Settings = ({ modelId }: { modelId: string }) => {
|
||||
onSuccess(res) {
|
||||
res && reset(res);
|
||||
modelId && setLastModelId(modelId);
|
||||
setRefresh(!refresh);
|
||||
},
|
||||
onError(err: any) {
|
||||
toast({
|
||||
@@ -278,6 +279,7 @@ const Settings = ({ modelId }: { modelId: string }) => {
|
||||
width={['100%', '260px']}
|
||||
min={100}
|
||||
max={tokenLimit}
|
||||
step={50}
|
||||
activeVal={getValues('chat.maxToken')}
|
||||
setVal={(val) => {
|
||||
setValue('chat.maxToken', val);
|
||||
|
Reference in New Issue
Block a user