40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
|
|
package entity
|
|||
|
|
|
|||
|
|
import "gitea.com/red-future/common/beans"
|
|||
|
|
|
|||
|
|
type promptConfigCol struct {
|
|||
|
|
beans.SQLBaseCol
|
|||
|
|
ModelTypeId string
|
|||
|
|
ModelType string
|
|||
|
|
PromptInfo string
|
|||
|
|
ResponseJsonSchema string
|
|||
|
|
Enabled string
|
|||
|
|
Version string
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var PromptConfigCol = promptConfigCol{
|
|||
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|||
|
|
ModelTypeId: "model_type_id",
|
|||
|
|
ModelType: "model_type",
|
|||
|
|
PromptInfo: "prompt_info",
|
|||
|
|
ResponseJsonSchema: "response_json_schema",
|
|||
|
|
Enabled: "enabled",
|
|||
|
|
Version: "version",
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// PromptConfig 模型提示词配置
|
|||
|
|
//
|
|||
|
|
// 说明:
|
|||
|
|
// - prompt_info 使用 JSONB 保存(对外用 json 传输)
|
|||
|
|
// - response_json_schema 为模型返回 JSON 格式约束
|
|||
|
|
// - enabled:1启用/0禁用
|
|||
|
|
type PromptConfig struct {
|
|||
|
|
beans.SQLBaseDO `orm:",inline"`
|
|||
|
|
ModelTypeId int `orm:"model_type_id" json:"modelTypeId"`
|
|||
|
|
ModelType string `orm:"model_type" json:"modelType"`
|
|||
|
|
PromptInfo any `orm:"prompt_info" json:"promptInfo"`
|
|||
|
|
ResponseJsonSchema any `orm:"response_json_schema" json:"responseJsonSchema"`
|
|||
|
|
Enabled int `orm:"enabled" json:"enabled"`
|
|||
|
|
Version string `orm:"version" json:"version"`
|
|||
|
|
}
|