Visual_Novel_iOS/crush/Crush/Src/Models/AIDicts.swift

141 lines
3.5 KiB
Swift
Raw Normal View History

2025-10-09 10:29:35 +00:00
//
// AIDicts.swift
// Crush
//
// Created by Leon on 2025/7/29.
//
// MARK: - AI Dict
/// AI
struct AIDictInfo: Codable {
///
var roleDictList: [DictNode]?
///
var characterDictList: [DictNode]?
///
var tagDictList: [DictNode]?
var imageStyleDictList: [ImageStylePic]?
///
// var imageStylePicList: [ImageStylePic]?
///
var timbreDictList: [TimbreDict]?
}
struct DictNode: Codable {
var code: String?
var name: String = "-"
var childDictList: [DictNode]?
}
/**
{
"prompt": "https://public-pictures.epal.gg/app/images/chatRoom/gift/ordinary/Luv_ya.png",
"sort": 0,
"url": "https://public-pictures.epal.gg/app/images/chatRoom/gift/ordinary/Luv_ya.png",
"id": 1,
"code": "IS0001",
"isDelete": 0,
"createTime": null,
"name": "风格1"
}
*/
struct ImageStylePic: Codable {
var prompt: String?
var sort: Int?
var url: String?
var id: Int?
var code: String?
var isDelete: Int = 0
var createTime: String?
var name: String = ""
}
///
struct TimbreDict: Codable {
var id: Int?
var type: Int?
var supportEmotions: String?
var code: String?
///
var name: String?
///
var description: String?
var url: String?
var isDelete: Int?
var createTime: String?
var voiceType: String?
var voiceText: String?
/// -5
var pitchRate: Int?
/// 10
var speechRate: Int?
/*
{
"description" : "男;少年;温柔",
"id" : 1,
"supportEmotions" : null,
"url" : "https:\/\/hhb.crushlevel.ai\/static\/sound\/TB0001.mp3",
"type" : 1,
"isDelete" : 0,
"code" : "TB0001",
"createTime" : null,
"language" : null,
"voiceText" : "你好,我是荒野大镖客",
"voiceType" : "S_vrx7PzCx1",
"name" : "温柔男声"
}
*/
}
// MARK: - Gift
struct GiftDictModel: Codable{
var name: String?
var sort: Int?
var id: Int?
var price: Int?
var heartbeatLevel: HeartbeatLevel?
var startVal: Int?
var desc: String?
var icon: String?
///
var isMemberGift: Bool?
/*
{
"name": "交朋友",
"sort": 1,
"id": 1,
"price": 10,
"heartbeatLevel": null,
"startVal": null,
"desc": null,
"isMemberGift": true,
"icon": "https://public-pictures.epal.gg/app/images/chatRoom/gift/ordinary/Lolipop.png"
}*/
}
// MARK: - ChatModel
struct AIChatModel: Codable {
var code: String? // code
var name: String? //
var description: String? //
var textPrice: Int? //
var voicePrice: Int? //
var voiceChatPrice: Int? //
var questionMark: String? //
/*
{
"code": "CM0002",
"questionMark": "2文本消息价格是指与角色进行文本消息对话的价格含发送语音含发送图片发送礼物
",
"textPrice": 220,
"voiceChatPrice": 240,
"description": "2与AI进行角色扮演对话",
"name": "2角色扮演模型"
}
*/
}