Skip to content

Commit

Permalink
fix model select ollama bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mckaywrigley committed Jan 20, 2024
1 parent 4ff64b7 commit b4ec5a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/models/model-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ export const ModelSelect: FC<ModelSelectProps> = ({
model => model.modelId === selectedModelId
)

if (!SELECTED_MODEL || !profile) return null
if (!profile) return null

const usingLocalModels = availableLocalModels.length > 0

console.log("test")

return (
<DropdownMenu
open={isOpen}
Expand All @@ -119,22 +121,22 @@ export const ModelSelect: FC<ModelSelectProps> = ({
<WithTooltip
display={
<div>
Save {SELECTED_MODEL.provider} API key in profile settings
Save {SELECTED_MODEL?.provider} API key in profile settings
to unlock.
</div>
}
trigger={<IconLock className="mr-2" size={26} />}
/>
) : (
<ModelIcon
modelId={SELECTED_MODEL.modelId as LLMID}
modelId={SELECTED_MODEL?.modelId as LLMID}
width={26}
height={26}
/>
)}

<div className="ml-2 flex items-center">
{SELECTED_MODEL.modelName}
{SELECTED_MODEL?.modelName}
</div>
</div>

Expand Down

0 comments on commit b4ec5a0

Please sign in to comment.