50 lines
1.7 KiB
Go
50 lines
1.7 KiB
Go
|
|
package entity
|
||
|
|
|
||
|
|
import "gitea.com/red-future/common/beans"
|
||
|
|
|
||
|
|
// ProviderProtocol 模型协议映射配置
|
||
|
|
type ProviderProtocol struct {
|
||
|
|
beans.SQLBaseDO `orm:",inherit"`
|
||
|
|
// 业务字段
|
||
|
|
ProviderName string `orm:"provider_name" json:"providerName"`
|
||
|
|
TargetField string `orm:"target_field" json:"targetField"`
|
||
|
|
MergeOrder any `orm:"merge_order" json:"mergeOrder"`
|
||
|
|
RoleMapping any `orm:"role_mapping" json:"roleMapping"`
|
||
|
|
ContentMapping any `orm:"content_mapping" json:"contentMapping"`
|
||
|
|
Capabilities any `orm:"capabilities" json:"capabilities"`
|
||
|
|
RequestTemplate any `orm:"request_template" json:"requestTemplate"`
|
||
|
|
SystemPromptTemplate string `orm:"system_prompt_template" json:"systemPromptTemplate"`
|
||
|
|
Status int `orm:"status" json:"status"`
|
||
|
|
Remark string `orm:"remark" json:"remark"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// providerProtocolCol 列名
|
||
|
|
type providerProtocolCol struct {
|
||
|
|
beans.SQLBaseCol
|
||
|
|
ProviderName string
|
||
|
|
TargetField string
|
||
|
|
MergeOrder string
|
||
|
|
RoleMapping string
|
||
|
|
ContentMapping string
|
||
|
|
Capabilities string
|
||
|
|
RequestTemplate string
|
||
|
|
SystemPromptTemplate string
|
||
|
|
Status string
|
||
|
|
Remark string
|
||
|
|
}
|
||
|
|
|
||
|
|
// ProviderProtocolCol 列名常量
|
||
|
|
var ProviderProtocolCol = providerProtocolCol{
|
||
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
||
|
|
ProviderName: "provider_name",
|
||
|
|
TargetField: "target_field",
|
||
|
|
MergeOrder: "merge_order",
|
||
|
|
RoleMapping: "role_mapping",
|
||
|
|
ContentMapping: "content_mapping",
|
||
|
|
Capabilities: "capabilities",
|
||
|
|
RequestTemplate: "request_template",
|
||
|
|
SystemPromptTemplate: "system_prompt_template",
|
||
|
|
Status: "status",
|
||
|
|
Remark: "remark",
|
||
|
|
}
|