feat: Add support for builtin models in the application
- Introduced `is_builtin` property in the model configuration to identify builtin models. - Updated frontend components to display a tag for builtin models in the ModelSelector and ModelSettings. - Enhanced the ModelEditorDialog to prevent editing and deletion of builtin models. - Implemented logic in the backend to hide sensitive information for builtin models and restrict their modification. - Added informative UI elements to clarify the nature of builtin models in the settings and editor views.
This commit is contained in:
@@ -66,6 +66,8 @@ type Model struct {
|
||||
Parameters ModelParameters `yaml:"parameters" json:"parameters" gorm:"type:json"`
|
||||
// Whether the model is the default model
|
||||
IsDefault bool `yaml:"is_default" json:"is_default"`
|
||||
// Whether the model is a builtin model (visible to all tenants)
|
||||
IsBuiltin bool `yaml:"is_builtin" json:"is_builtin" gorm:"default:false"`
|
||||
// Model status, default: active, possible: downloading, download_failed
|
||||
Status ModelStatus `yaml:"status" json:"status"`
|
||||
// Creation time of the model
|
||||
|
||||
Reference in New Issue
Block a user