mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 12:25:53 +08:00
Chore/model icon url (#9218)
Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: jyong <718720800@qq.com>
This commit is contained in:
parent
1c1e008dcf
commit
d498f4e55e
@ -126,13 +126,12 @@ class ModelProviderIconApi(Resource):
|
|||||||
Get model provider icon
|
Get model provider icon
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@setup_required
|
|
||||||
@login_required
|
|
||||||
@account_initialization_required
|
|
||||||
def get(self, provider: str, icon_type: str, lang: str):
|
def get(self, provider: str, icon_type: str, lang: str):
|
||||||
model_provider_service = ModelProviderService()
|
model_provider_service = ModelProviderService()
|
||||||
icon, mimetype = model_provider_service.get_model_provider_icon(
|
icon, mimetype = model_provider_service.get_model_provider_icon(
|
||||||
provider=provider, icon_type=icon_type, lang=lang
|
provider=provider,
|
||||||
|
icon_type=icon_type,
|
||||||
|
lang=lang,
|
||||||
)
|
)
|
||||||
|
|
||||||
return send_file(io.BytesIO(icon), mimetype=mimetype)
|
return send_file(io.BytesIO(icon), mimetype=mimetype)
|
||||||
|
@ -26,7 +26,7 @@ const ModelIcon: FC<ModelIconProps> = ({
|
|||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
alt='model-icon'
|
alt='model-icon'
|
||||||
src={`${provider.icon_small[language] || provider.icon_small.en_US}?_token=${localStorage.getItem('console_token')}`}
|
src={`${provider.icon_small[language] || provider.icon_small.en_US}`}
|
||||||
className={`w-4 h-4 ${className}`}
|
className={`w-4 h-4 ${className}`}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
@ -16,7 +16,7 @@ const ProviderIcon: FC<ProviderIconProps> = ({
|
|||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
alt='provider-icon'
|
alt='provider-icon'
|
||||||
src={`${provider.icon_large[language] || provider.icon_large.en_US}?_token=${localStorage.getItem('console_token')}`}
|
src={`${provider.icon_large[language] || provider.icon_large.en_US}`}
|
||||||
className={`w-auto h-6 ${className}`}
|
className={`w-auto h-6 ${className}`}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user