fix: add model display name
This commit is contained in:
+21
-19
@@ -35,22 +35,22 @@ const (
|
||||
type ModelSource string
|
||||
|
||||
const (
|
||||
ModelSourceLocal ModelSource = "local" // Local model
|
||||
ModelSourceRemote ModelSource = "remote" // Remote model
|
||||
ModelSourceAliyun ModelSource = "aliyun" // Aliyun DashScope model
|
||||
ModelSourceZhipu ModelSource = "zhipu" // Zhipu model
|
||||
ModelSourceVolcengine ModelSource = "volcengine" // Volcengine model
|
||||
ModelSourceDeepseek ModelSource = "deepseek" // Deepseek model
|
||||
ModelSourceHunyuan ModelSource = "hunyuan" // Hunyuan model
|
||||
ModelSourceMinimax ModelSource = "minimax" // Minimax mode
|
||||
ModelSourceOpenAI ModelSource = "openai" // OpenAI model
|
||||
ModelSourceGemini ModelSource = "gemini" // Gemini model
|
||||
ModelSourceMimo ModelSource = "mimo" // Mimo model
|
||||
ModelSourceSiliconFlow ModelSource = "siliconflow" // SiliconFlow model
|
||||
ModelSourceJina ModelSource = "jina" // Jina AI model
|
||||
ModelSourceOpenRouter ModelSource = "openrouter" // OpenRouter model
|
||||
ModelSourceNvidia ModelSource = "nvidia" // NVIDIA model
|
||||
ModelSourceNovita ModelSource = "novita" // Novita AI model
|
||||
ModelSourceLocal ModelSource = "local" // Local model
|
||||
ModelSourceRemote ModelSource = "remote" // Remote model
|
||||
ModelSourceAliyun ModelSource = "aliyun" // Aliyun DashScope model
|
||||
ModelSourceZhipu ModelSource = "zhipu" // Zhipu model
|
||||
ModelSourceVolcengine ModelSource = "volcengine" // Volcengine model
|
||||
ModelSourceDeepseek ModelSource = "deepseek" // Deepseek model
|
||||
ModelSourceHunyuan ModelSource = "hunyuan" // Hunyuan model
|
||||
ModelSourceMinimax ModelSource = "minimax" // Minimax mode
|
||||
ModelSourceOpenAI ModelSource = "openai" // OpenAI model
|
||||
ModelSourceGemini ModelSource = "gemini" // Gemini model
|
||||
ModelSourceMimo ModelSource = "mimo" // Mimo model
|
||||
ModelSourceSiliconFlow ModelSource = "siliconflow" // SiliconFlow model
|
||||
ModelSourceJina ModelSource = "jina" // Jina AI model
|
||||
ModelSourceOpenRouter ModelSource = "openrouter" // OpenRouter model
|
||||
ModelSourceNvidia ModelSource = "nvidia" // NVIDIA model
|
||||
ModelSourceNovita ModelSource = "novita" // Novita AI model
|
||||
ModelSourceAzureOpenAI ModelSource = "azure_openai" // Azure OpenAI model
|
||||
)
|
||||
|
||||
@@ -65,9 +65,9 @@ type ModelParameters struct {
|
||||
APIKey string `yaml:"api_key" json:"api_key"`
|
||||
InterfaceType string `yaml:"interface_type" json:"interface_type"`
|
||||
EmbeddingParameters EmbeddingParameters `yaml:"embedding_parameters" json:"embedding_parameters"`
|
||||
ParameterSize string `yaml:"parameter_size" json:"parameter_size"` // Ollama model parameter size (e.g., "7B", "13B", "70B")
|
||||
Provider string `yaml:"provider" json:"provider"` // Provider identifier: openai, aliyun, zhipu, generic
|
||||
ExtraConfig map[string]string `yaml:"extra_config" json:"extra_config"` // Provider-specific configuration
|
||||
ParameterSize string `yaml:"parameter_size" json:"parameter_size"` // Ollama model parameter size (e.g., "7B", "13B", "70B")
|
||||
Provider string `yaml:"provider" json:"provider"` // Provider identifier: openai, aliyun, zhipu, generic
|
||||
ExtraConfig map[string]string `yaml:"extra_config" json:"extra_config"` // Provider-specific configuration
|
||||
// CustomHeaders 允许在调用远程模型 API 时附加自定义 HTTP 请求头,
|
||||
// 用途类似 Python OpenAI SDK 的 extra_headers 参数,
|
||||
// 常见场景包括透传企业网关鉴权信息、追踪 ID、路由标识等。
|
||||
@@ -111,6 +111,8 @@ type Model struct {
|
||||
TenantID uint64 `yaml:"tenant_id" json:"tenant_id"`
|
||||
// Name of the model
|
||||
Name string `yaml:"name" json:"name"`
|
||||
// Optional user-facing display name. Runtime calls still use Name.
|
||||
DisplayName string `yaml:"display_name" json:"display_name" gorm:"type:varchar(255);default:''"`
|
||||
// Type of the model
|
||||
Type ModelType `yaml:"type" json:"type"`
|
||||
// Source of the model
|
||||
|
||||
Reference in New Issue
Block a user