Skip to content

Commit

Permalink
fix: local model list not refreshing on import
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Jul 19, 2024
1 parent 00dc9de commit fa3fe73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/Endpoint/Local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Local = () => {
return { name: item }
})
const [currentModel, setCurrentModel] = useMMKVString(Global.LocalModel)
const [downloadLink, setDownloadLink] = useState('')
//const [downloadLink, setDownloadLink] = useState('')
const [preset, setPreset] = useMMKVObject<LlamaPreset>(Global.LocalPreset)
const [saveKV, setSaveKV] = useMMKVBoolean(AppSettings.SaveLocalKV)
const [kvSize, setKVSize] = useState<number>(-1)
Expand Down Expand Up @@ -85,18 +85,19 @@ const Local = () => {
await unloadModel()
}

const handleDownload = () => {
/*const handleDownload = () => {
setDownloadLink('')
Llama.downloadModel(downloadLink).then(() => {
getModels()
})
}
}*/

const handleImport = async () => {
setModelLoading(true)
await Llama.importModel().then(() => {
getModels()
})
await getModels()
setModelLoading(false)
}

Expand Down

0 comments on commit fa3fe73

Please sign in to comment.