Skip to content

Commit

Permalink
chore: update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Dec 19, 2024
1 parent 171cbee commit 84db051
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/hooks/useRecommendedModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default function useRecommendedModel() {
if (models.length === 0) {
// if we have no downloaded models, then can't recommend anything
console.debug("No downloaded models, can't recommend anything")
setRecommendedModel(undefined)
return
}

Expand All @@ -76,7 +77,7 @@ export default function useRecommendedModel() {
// if we don't have [lastUsedModelId], then we can just use the first model
// in the downloaded list
if (!lastUsedModelId) {
setRecommendedModel(undefined)
setRecommendedModel(models[0])
return
}

Expand All @@ -87,7 +88,7 @@ export default function useRecommendedModel() {
console.debug(
`Last used model ${lastUsedModelId} not found, using first model in list ${models[0].id}}`
)
setRecommendedModel(undefined)
setRecommendedModel(models[0])
return
}

Expand Down

0 comments on commit 84db051

Please sign in to comment.