prompts-core
This commit is contained in:
39
model/entity/prompt_config.go
Normal file
39
model/entity/prompt_config.go
Normal file
@@ -0,0 +1,39 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user