添加聊天角色功能

This commit is contained in:
RockYang
2023-03-24 16:26:24 +08:00
parent bb019f3552
commit 967ca441d7
8 changed files with 155 additions and 43 deletions

View File

@@ -14,8 +14,9 @@ type Config struct {
Session Session
ProxyURL string
Chat Chat
EnableAuth bool // 是否开启鉴权
Tokens []string // 授权的白名单列表 TODO: 后期要存储到 LevelDB 或者 Mysql 数据库
EnableAuth bool // 是否开启鉴权
Tokens []string // 授权的白名单列表 TODO: 后期要存储到 LevelDB 或者 Mysql 数据库
ChatRoles map[string]ChatRole // 保存预设角色信息
}
// Chat configs struct
@@ -63,6 +64,7 @@ func NewDefaultConfig() *Config {
EnableContext: true,
},
EnableAuth: true,
ChatRoles: GetDefaultChatRole(),
}
}