fix: api local server max ctx len not update when switch model (#4027)
* fix: api local server max ctx len not update when switch model * chore: remove log
This commit is contained in:
parent
f5a709b268
commit
c548381590
@ -19,8 +19,10 @@ import { getConfigurationsData } from '@/utils/componentSettings'
|
||||
|
||||
import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom'
|
||||
import { selectedModelAtom } from '@/helpers/atoms/Model.atom'
|
||||
import { getActiveThreadModelParamsAtom } from '@/helpers/atoms/Thread.atom'
|
||||
|
||||
const LocalServerRightPanel = () => {
|
||||
const activeModelParams = useAtomValue(getActiveThreadModelParamsAtom)
|
||||
const loadModelError = useAtomValue(loadModelErrorAtom)
|
||||
const serverEnabled = useAtomValue(serverEnabledAtom)
|
||||
const setModalTroubleShooting = useSetAtom(modalTroubleShootingAtom)
|
||||
@ -48,8 +50,17 @@ const LocalServerRightPanel = () => {
|
||||
selectedModel
|
||||
)
|
||||
|
||||
const modelEngineParams = extractModelLoadParams(
|
||||
{
|
||||
...selectedModel?.settings,
|
||||
...activeModelParams,
|
||||
},
|
||||
selectedModel?.settings
|
||||
)
|
||||
|
||||
const componentDataEngineSetting = getConfigurationsData(
|
||||
currentModelSettingParams
|
||||
modelEngineParams,
|
||||
selectedModel
|
||||
)
|
||||
|
||||
const engineSettings = useMemo(
|
||||
@ -57,6 +68,7 @@ const LocalServerRightPanel = () => {
|
||||
componentDataEngineSetting.filter(
|
||||
(x) => x.key !== 'prompt_template' && x.key !== 'embedding'
|
||||
),
|
||||
|
||||
[componentDataEngineSetting]
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user