feat: 新增配置与提示词偏好页
后端新增 preferences 与 prompt_customizations 表及对应接口, 支持 BYOK 模型渠道密钥落库(仅回显掩码)与按任务类型定制 平台提示词模板;前端新增 /settings 页面及入口。
This commit is contained in:
1 parent
ae6cdf1551
commit
b9df2f84ab
27 files changed
+1515
-22
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// 提示词定制模式:跟随平台模板 / 在模板后追加要求 / 完全改写。
|
||||
const (
|
||||
PromptModeInherit = "inherit"
|
||||
PromptModeAppend = "append"
|
||||
PromptModeRewrite = "rewrite"
|
||||
)
|
||||
|
||||
// PromptCustomization 用户对某个任务类型提示词的定制。
|
||||
// 平台模板本身内置在 internal/prompts,只有定制需要落库;一个任务类型最多一条。
|
||||
type PromptCustomization struct {
|
||||
ID string `gorm:"primaryKey;size:64" json:"id"`
|
||||
Operation string `gorm:"size:64;not null;uniqueIndex" json:"operation"`
|
||||
Mode string `gorm:"size:16;not null" json:"mode"`
|
||||
Content string `gorm:"type:text" json:"content"`
|
||||
|
||||
// BaseTemplateVersion 定制时依据的平台模板版本,用于判断定制是否已落后于平台更新。
|
||||
BaseTemplateVersion int `json:"baseTemplateVersion"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
Reference in new issue
Block a user