fix: switching loader from remote to local model from thread right panel
This commit is contained in:
parent
612445b4fa
commit
a3f2a16cb4
@ -55,8 +55,6 @@ export default function DropdownListSidebar() {
|
|||||||
|
|
||||||
const { recommendedModel, downloadedModels } = useRecommendedModel()
|
const { recommendedModel, downloadedModels } = useRecommendedModel()
|
||||||
|
|
||||||
const selectedName =
|
|
||||||
downloadedModels.filter((x) => x.id === selectedModel?.id)[0]?.name ?? ''
|
|
||||||
/**
|
/**
|
||||||
* Default value for max_tokens and ctx_len
|
* Default value for max_tokens and ctx_len
|
||||||
* Its to avoid OOM issue since a model can set a big number for these settings
|
* Its to avoid OOM issue since a model can set a big number for these settings
|
||||||
@ -67,7 +65,7 @@ export default function DropdownListSidebar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSelectedModel(activeModel || recommendedModel)
|
setSelectedModel(selectedModel || activeModel || recommendedModel)
|
||||||
|
|
||||||
if (activeThread) {
|
if (activeThread) {
|
||||||
const finishInit = threadStates[activeThread.id].isFinishInit ?? true
|
const finishInit = threadStates[activeThread.id].isFinishInit ?? true
|
||||||
@ -148,7 +146,6 @@ export default function DropdownListSidebar() {
|
|||||||
serverEnabled,
|
serverEnabled,
|
||||||
activeThreadId,
|
activeThreadId,
|
||||||
activeModel,
|
activeModel,
|
||||||
setSelectedModel,
|
|
||||||
setThreadModelParams,
|
setThreadModelParams,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -180,7 +177,7 @@ export default function DropdownListSidebar() {
|
|||||||
stateModel.loading && 'font-medium'
|
stateModel.loading && 'font-medium'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{selectedName}
|
{selectedModel?.name}
|
||||||
</span>
|
</span>
|
||||||
</SelectValue>
|
</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user