chore: fix type access
This commit is contained in:
parent
c7bc2eff62
commit
9cf63f87cc
@ -196,8 +196,8 @@ const ModelDropdown = ({
|
||||
const model = downloadedModels.find((model) => model.id === modelId)
|
||||
if (model) {
|
||||
if (
|
||||
engines?.[model.engine]?.[0].type === 'local' ||
|
||||
(engines?.[model.engine]?.[0].api_key?.length ?? 0) > 0
|
||||
engines?.[model.engine]?.[0]?.type === 'local' ||
|
||||
(engines?.[model.engine]?.[0]?.api_key?.length ?? 0) > 0
|
||||
)
|
||||
setSelectedModel(model)
|
||||
} else {
|
||||
|
||||
@ -2,7 +2,7 @@ import { memo, useState } from 'react'
|
||||
|
||||
import { Model } from '@janhq/core'
|
||||
import { Badge, Button, Tooltip, useClickOutside } from '@janhq/joi'
|
||||
import { useAtom, useAtomValue } from 'jotai'
|
||||
import { useAtom } from 'jotai'
|
||||
import {
|
||||
MoreVerticalIcon,
|
||||
PlayIcon,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user