同步配置

This commit is contained in:
zcl
2025-08-26 15:14:47 +08:00
parent 58bac34580
commit 62a3179c20
6 changed files with 93 additions and 8 deletions
+56 -6
View File
@@ -70,6 +70,8 @@ export class AiCharacter {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.systemInstruction = _buf_.readString()
this.basePrompt = _buf_.readString()
this.additionPrompt = _buf_.readString()
}
/**
@@ -80,10 +82,20 @@ export class AiCharacter {
* 系统指令
*/
readonly systemInstruction: string
/**
* 个人信息基础prompt(聊天&评分都需要)
*/
readonly basePrompt: string
/**
* 额外信息prompt(聊天&评分都需要)
*/
readonly additionPrompt: string
resolve(tables:Tables) {
}
}
@@ -101,7 +113,6 @@ export class Girl {
this.tagKey = _buf_.readString()
this.priceType = _buf_.readInt()
this.avatarPath = _buf_.readString()
this.starCount = _buf_.readInt()
}
/**
@@ -132,10 +143,6 @@ export class Girl {
* 头像路径
*/
readonly avatarPath: string
/**
* 评价星数
*/
readonly starCount: number
resolve(tables:Tables) {
@@ -145,7 +152,6 @@ export class Girl {
}
}
@@ -158,8 +164,12 @@ export class GirlDetail {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.detailDesc = _buf_.readString()
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.imageType = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readInt(); this.imageType.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.imagePrice = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readFloat(); this.imagePrice.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.pics = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.pics.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.vids = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.vids.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.emotion = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.emotion.push(_e0);}}
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.videoPrice = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readFloat(); this.videoPrice.push(_e0);}}
}
/**
@@ -170,6 +180,14 @@ export class GirlDetail {
* 自我介绍
*/
readonly detailDesc: string
/**
* 类型
*/
readonly imageType: number[]
/**
* 价格
*/
readonly imagePrice: number[]
/**
* 图片资源列表
*/
@@ -178,12 +196,24 @@ export class GirlDetail {
* 视频资源列表
*/
readonly vids: string[]
/**
* 关联情绪
*/
readonly emotion: string[]
/**
* 价格
*/
readonly videoPrice: number[]
resolve(tables:Tables) {
}
}
@@ -201,6 +231,8 @@ export class GlobalConfig {
this.Timeout = _buf_.readInt()
this.FreeChatTimes = _buf_.readInt()
this.GameName = _buf_.readString()
this.EmotionRating = _buf_.readString()
this.girlBasePrompt = _buf_.readString()
}
/**
@@ -228,6 +260,14 @@ export class GlobalConfig {
* 游戏名
*/
readonly GameName: string
/**
* 情绪评分机器人system_prompt,需拼接角色prompt
*/
readonly EmotionRating: string
/**
* ai机器人基础规则
*/
readonly girlBasePrompt: string
resolve(tables:Tables) {
@@ -237,6 +277,8 @@ export class GlobalConfig {
}
}
@@ -646,6 +688,14 @@ export class TbGlobalConfig {
* 游戏名
*/
get GameName(): string { return this._data.GameName; }
/**
* 情绪评分机器人system_prompt,需拼接角色prompt
*/
get EmotionRating(): string { return this._data.EmotionRating; }
/**
* ai机器人基础规则
*/
get girlBasePrompt(): string { return this._data.girlBasePrompt; }
resolve(tables:Tables) {
this._data.resolve(tables)