feat: add optional free model tag display
This commit is contained in:
parent
a70e69caf9
commit
a051f9fa44
@ -10,15 +10,16 @@ import WebSearchIcon from './Icons/WebSearchIcon'
|
||||
|
||||
interface ModelTagsProps {
|
||||
model: Model
|
||||
showFree?: boolean
|
||||
}
|
||||
|
||||
const ModelTags: FC<ModelTagsProps> = ({ model }) => {
|
||||
const ModelTags: FC<ModelTagsProps> = ({ model, showFree = true }) => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<>
|
||||
{isVisionModel(model) && <VisionIcon />}
|
||||
{isWebSearchModel(model) && <WebSearchIcon />}
|
||||
{isFreeModel(model) && (
|
||||
{showFree && isFreeModel(model) && (
|
||||
<Tag style={{ marginLeft: 10 }} color="green">
|
||||
{t('models.free')}
|
||||
</Tag>
|
||||
|
||||
@ -39,7 +39,7 @@ const SelectModelButton: FC<Props> = ({ assistant }) => {
|
||||
<ModelName>
|
||||
{model ? model.name : t('button.select_model')} {providerName ? '| ' + providerName : ''}
|
||||
</ModelName>
|
||||
<ModelTags model={model} />
|
||||
<ModelTags model={model} showFree={false} />
|
||||
</ButtonContent>
|
||||
</DropdownButton>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user