@advjs/ai
Version:
AI module for AdvJS
195 lines (189 loc) • 4.38 kB
text/typescript
import * as tencentcloud_sdk_nodejs_hunyuan_tencentcloud_services_hunyuan_v20230901_hunyuan_client from 'tencentcloud-sdk-nodejs-hunyuan/tencentcloud/services/hunyuan/v20230901/hunyuan_client';
/**
* 你是一名为视觉小说编写对话的专业人员。
* 你需要为每一章节中的每一个节点编写引人入胜的对话,这些对话要能够反映角色的性格特点,并推动剧情的发展。
*/
interface AdvAIChapter {
/**
* Chapter ID
* @example chapter_01
*/
id: string;
/**
* 章节标题
*/
title: string;
/**
* 章节剧情概要
*/
description?: string;
/**
* 故事节点列表
*/
nodes: {
/**
* Node ID
* @example ch1_node_01
*/
id: string;
/**
* 情节总结
*/
plotSummary?: string;
/**
* 场景氛围和内容描述
*
* 您是一名专业的文本转图像提示生成者。
*
* - 根据当前 plotSummary,生成一个详细的图像提示,描述场景、角色、光线、风格、氛围、构图等。
*/
scenePrompt?: string;
/**
* 对话列表
*/
dialogues: {
/**
* 对话内容
*/
text: string;
/**
* 对话角色 ID
* 角色 ID 应该与 `characters` 中的人物相匹配
* @example character_01
*/
speakerId: string;
}[];
/**
* 目标节点 ID
* 指向下一个节点
*/
target?: string;
}[];
/**
* Start Node ID
*
* Defaults to the first node
*/
startNodeId?: string;
}
/**
* 人物角色设定
*/
interface AdvAICharacter {
/**
* 角色 ID
*/
id: string;
/**
* 角色名称
*/
name: string;
/**
* 角色头像
*/
/**
* 角色描述
*/
description?: string;
/**
* 外貌特征
*/
appearance?: string;
/**
* 人物背景
*/
background?: string;
/**
* 人物特质
*
* @example 犹豫不决
*/
concept?: string;
}
/**
* Generate AI Content
*/
interface AdvAIConfig {
/**
* 引人入胜的故事标题
*/
title: string;
/**
* 故事简介
* 概述主要情节
*/
description?: string;
/**
* 多个主要角色初始设定
*/
characters: AdvAICharacter[];
/**
* 章节列表
*/
chapters: AdvAIChapter[];
}
/**
* 遍历 chapters nodes
*/
declare function walkChapterNodes({ json }: {
json: AdvAIConfig;
}): string[];
/**
* @see [文生图轻量版风格列表](https://cloud.tencent.com/document/product/1729/108992)
*
* hunyuanClient.TextToImageLite(params)
*/
declare const hunyuanClient: tencentcloud_sdk_nodejs_hunyuan_tencentcloud_services_hunyuan_v20230901_hunyuan_client.Client;
declare const HUNYUAN_STYLES: {
'\uFF08\u4E0D\u9650\u5B9A\u98CE\u683C\uFF09': string;
水墨画: string;
概念艺术: string;
油画1: string;
'\u6CB9\u753B2\uFF08\u68B5\u9AD8\uFF09': string;
水彩画: string;
像素画: string;
厚涂风格: string;
插图: string;
剪纸风格: string;
'\u5370\u8C61\u6D3E1\uFF08\u83AB\u5948\uFF09': string;
印象派2: string;
'2.5D': string;
古典肖像画: string;
黑白素描画: string;
赛博朋克: string;
科幻风格: string;
暗黑风格: string;
'3D': string;
蒸汽波: string;
日系动漫: string;
怪兽风格: string;
唯美古风: string;
复古动漫: string;
游戏卡通手绘: string;
通用写实风格: string;
};
interface AdvWriterWorkflowParams {
/**
* 主人公
*/
protagonist?: string;
/**
* 故事背景
*/
storyBackground: string;
/**
* 是否覆盖
* @default false
*/
overwrite?: boolean;
/**
* 目标文件夹
*/
outputDir?: string;
}
/**
* 剧本工作流
*/
declare function writerWorkflow(params: AdvWriterWorkflowParams): Promise<void>;
export { HUNYUAN_STYLES, hunyuanClient, walkChapterNodes, writerWorkflow };
export type { AdvAIChapter, AdvAICharacter, AdvAIConfig, AdvWriterWorkflowParams };