请求AI角色配置
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Ai角色配置
|
||||
*/
|
||||
import { BaseData } from "./BaseData";
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
|
||||
export class AiCharacterData extends BaseData {
|
||||
// api键
|
||||
private _apiKey: string = "";
|
||||
|
||||
|
||||
public reset(): void {
|
||||
this._apiKey = "";
|
||||
}
|
||||
|
||||
public clear(): void {
|
||||
this._apiKey = "";
|
||||
}
|
||||
|
||||
public destroy(): void {
|
||||
super.destroy();
|
||||
this._apiKey = null;
|
||||
}
|
||||
|
||||
/** 设置Ai角色配置*/
|
||||
public set aiCharacter(data: proto.cs.ICSGetResConfigRes) {
|
||||
const parsed = JSON.parse(data.data);
|
||||
console.log("请求Ai角色配置的解析数据:", parsed);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** 获取api键 */
|
||||
public getApiKey(): string {
|
||||
return this._apiKey;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user