feat: allow bind a chat model for chat role

This commit is contained in:
RockYang
2024-04-05 12:51:18 +08:00
parent 6a3e26b566
commit 8be9a21efd
10 changed files with 114 additions and 48 deletions

View File

@@ -9,4 +9,5 @@ type ChatRole struct {
Icon string // 角色聊天图标
Enable bool // 是否启用被启用
SortNum int //排序数字
ModelId int // 绑定模型ID绑定模型ID的角色只能用指定的模型来问答
}

View File

@@ -4,11 +4,13 @@ import "chatplus/core/types"
type ChatRole struct {
BaseVo
Key string `json:"key"` // 角色唯一标识
Name string `json:"name"` // 角色名称
Context []types.Message `json:"context"` // 角色语料信息
HelloMsg string `json:"hello_msg"` // 打招呼的消息
Icon string `json:"icon"` // 角色聊天图标
Enable bool `json:"enable"` // 是否启用被启用
SortNum int `json:"sort"` // 排序
Key string `json:"key"` // 角色唯一标识
Name string `json:"name"` // 角色名称
Context []types.Message `json:"context"` // 角色语料信息
HelloMsg string `json:"hello_msg"` // 打招呼的消息
Icon string `json:"icon"` // 角色聊天图标
Enable bool `json:"enable"` // 是否启用被启用
SortNum int `json:"sort"` // 排序
ModelId int `json:"model_id"` // 绑定模型 ID
ModelName string `json:"model_name"` // 模型名称
}