intelligentcreation-20240313/main.tea (4,923 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = '';
checkConfig(config);
@endpoint = getEndpoint('intelligentcreation', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AddDocumentInfo {
documentType?: string(name='documentType', description='This parameter is required.', example='pdf'),
name?: string(name='name', description='This parameter is required.'),
url?: string(name='url', description='This parameter is required.'),
}
model AddDocumentResult {
docName?: string(name='docName', example='example.pdf'),
documentInfo?: DocumentInfo(name='documentInfo'),
errorMessage?: string(name='errorMessage', example='true'),
success?: boolean(name='success', example='true'),
}
model AnchorResponse {
anchorCategory?: string(name='anchorCategory'),
anchorId?: string(name='anchorId'),
anchorMaterialName?: string(name='anchorMaterialName'),
anchorType?: string(name='anchorType'),
coverHeight?: int32(name='coverHeight'),
coverRate?: string(name='coverRate'),
coverThumbnailUrl?: string(name='coverThumbnailUrl'),
coverUrl?: string(name='coverUrl'),
coverWeight?: int32(name='coverWeight'),
digitalHumanType?: string(name='digitalHumanType'),
gender?: string(name='gender'),
resourceTypeDesc?: string(name='resourceTypeDesc'),
status?: string(name='status'),
supportBgChange?: int32(name='supportBgChange'),
useScene?: string(name='useScene'),
}
model BatchAddDocumentResult {
addDocumentResults?: [
AddDocumentResult
](name='addDocumentResults', description='This parameter is required.'),
requestId?: string(name='requestId', example='3239281273464326823'),
}
model DocumentInfo {
documentType?: string(name='documentType'),
id?: string(name='id'),
name?: string(name='name'),
processStatus?: string(name='processStatus'),
}
model DocumentResult {
documentInfo?: DocumentInfo(name='documentInfo'),
requestId?: string(name='requestId', example='3239281273464326823'),
}
model GetOssUploadTokenResult {
requestId?: string(name='requestId', example='3239281273464326823'),
uploadInfo?: UploadInfo(name='uploadInfo', description='This parameter is required.'),
}
model Illustration {
illustrationId?: long(name='illustrationId'),
oss?: string(name='oss'),
}
model IllustrationResult {
illustration?: Illustration(name='illustration'),
requestId?: string(name='requestId', example='3239281273464326823'),
}
model IllustrationTask {
gmtCreate?: string(name='gmtCreate'),
gmtModified?: string(name='gmtModified'),
illustrationIds?: [ long ](name='illustrationIds'),
illustrationTaskId?: long(name='illustrationTaskId'),
taskStatus?: string(name='taskStatus', example='Success'),
textId?: long(name='textId'),
}
model IllustrationTaskCreateCmd {
backgroundType?: int32(name='backgroundType', example='0-不换背景,1-换背景'),
dstHeight?: int32(name='dstHeight', example='1024'),
dstWidth?: int32(name='dstWidth', example='1024'),
idempotentId?: string(name='idempotentId', example='28274623764834'),
imageUrls?: [ string ](name='imageUrls'),
nums?: int32(name='nums', example='4'),
ossPaths?: [ string ](name='ossPaths'),
stickerText?: string(name='stickerText'),
}
model IllustrationTaskResult {
illustrationTask?: IllustrationTask(name='illustrationTask'),
requestId?: string(name='requestId', example='3239281273464326823'),
}
model KnowledgeBaseInfo {
description?: string(name='description'),
id?: string(name='id'),
industry?: string(name='industry'),
knowledgeBaseType?: string(name='knowledgeBaseType'),
name?: string(name='name'),
}
model KnowledgeBaseListResult {
knowledgeBases?: [
KnowledgeBaseInfo
](name='knowledgeBases'),
requestId?: string(name='requestId', example='3239281273464326823'),
total?: int32(name='total', description='This parameter is required.', example='10'),
}
model ReferenceTag {
referenceContent?: string(name='referenceContent'),
referenceTitle?: string(name='referenceTitle'),
}
model Text {
agentId?: string(name='agentId'),
agentName?: string(name='agentName'),
desc?: string(name='desc', description='This parameter is required.', example='xxx'),
errMsg?: string(name='errMsg'),
gmtCreate?: string(name='gmtCreate'),
gmtModified?: string(name='gmtModified'),
illustrationTaskIdList?: [ long ](name='illustrationTaskIdList'),
publishStatus?: string(name='publishStatus'),
textContent?: string(name='textContent'),
textId?: long(name='textId', description='This parameter is required.', example='1'),
textIllustrationTag?: boolean(name='textIllustrationTag', example='true'),
textModeType?: string(name='textModeType'),
textStatus?: string(name='textStatus', description='This parameter is required.', example='Generating'),
textStyleType?: string(name='textStyleType'),
textTaskId?: long(name='textTaskId', description='This parameter is required.', example='123'),
textThemes?: [ string ](name='textThemes'),
title?: string(name='title', example='xxx'),
userNameCreate?: string(name='userNameCreate', description='This parameter is required.', example='xxx'),
userNameModified?: string(name='userNameModified', description='This parameter is required.', example='xxx'),
}
model TextQueryResult {
requestId?: string(name='requestId'),
texts?: [
Text
](name='texts'),
total?: int32(name='total', example='10'),
}
model TextResult {
requestId?: string(name='requestId', example='3239281273464326823'),
text?: Text(name='text', description='This parameter is required.'),
}
model TextTask {
agentId?: string(name='agentId'),
agentName?: string(name='agentName'),
contentRequirement?: string(name='contentRequirement', example='九寨沟三日游攻略'),
gmtCreate?: string(name='gmtCreate'),
gmtModified?: string(name='gmtModified'),
introduction?: string(name='introduction'),
nums?: int32(name='nums', description='This parameter is required.', example='1'),
point?: string(name='point', example='xxx'),
referenceTag?: ReferenceTag(name='referenceTag'),
relatedRagIds?: [ long ](name='relatedRagIds'),
style?: string(name='style', description='This parameter is required.'),
target?: string(name='target'),
textIds?: [ long ](name='textIds'),
textModeType?: string(name='textModeType', description='This parameter is required.'),
textTaskId?: long(name='textTaskId'),
textTaskStatus?: string(name='textTaskStatus'),
texts?: [
Text
](name='texts'),
theme?: string(name='theme', example='旅游路线'),
themeDesc?: string(name='themeDesc'),
}
model TextTaskCreateCmd {
agentId?: string(name='agentId'),
contentRequirement?: string(name='contentRequirement', example='极氪007新车上市'),
idempotentId?: string(name='idempotentId', example='28274623764834'),
industry?: string(name='industry'),
introduction?: string(name='introduction', example='xxx'),
number?: int32(name='number', description='This parameter is required.', example='4'),
point?: string(name='point', example='超强续航'),
referenceTag?: ReferenceTag(name='referenceTag'),
relatedRagIds?: [ long ](name='relatedRagIds', example='1'),
streamApi?: boolean(name='streamApi', example='true'),
style?: string(name='style', description='This parameter is required.'),
target?: string(name='target'),
textModeType?: string(name='textModeType', description='This parameter is required.'),
theme?: string(name='theme', example='旅游路线'),
themes?: [ string ](name='themes'),
}
model TextTaskResult {
textTask?: TextTask(name='textTask'),
}
model TextTheme {
desc?: string(name='desc'),
name?: string(name='name'),
}
model TextThemeListResult {
requestId?: string(name='requestId', example='3239281273464326823'),
textThemeList?: [
TextTheme
](name='textThemeList', description='This parameter is required.'),
}
model UploadInfo {
accessId?: string(name='accessId', description='This parameter is required.', example='xxxxxx'),
host?: string(name='host', description='This parameter is required.', example='yic-pre.oss-cn-hangzhou.aliyuncs.com'),
key?: string(name='key', description='This parameter is required.', example='1234/temp-novels/xxxx-xxx-xx.txt'),
policy?: string(name='policy', description='This parameter is required.', example='xxxxxxxx'),
policySignature?: string(name='policySignature', description='This parameter is required.', example='xxxxxxx'),
url?: string(name='url', example='xxxxxx'),
}
model VoiceModelResponse {
resourceTypeDesc?: string(name='resourceTypeDesc'),
ttsVersion?: int32(name='ttsVersion'),
useScene?: string(name='useScene'),
voiceDesc?: string(name='voiceDesc'),
voiceGender?: string(name='voiceGender'),
voiceId?: long(name='voiceId'),
voiceLanguage?: string(name='voiceLanguage'),
voiceModel?: string(name='voiceModel'),
voiceName?: string(name='voiceName'),
voiceType?: string(name='voiceType'),
voiceUrl?: string(name='voiceUrl'),
}
model AddTextFeedbackRequest {
content?: string(name='content'),
quality?: int32(name='quality', example='1'),
textId?: long(name='textId', example='8478'),
}
model AddTextFeedbackResponseBody = {
requestId?: string(name='requestId', example='3239281273464326823'),
success?: boolean(name='success', example='True'),
}
model AddTextFeedbackResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: AddTextFeedbackResponseBody(name='body'),
}
/**
* @summary 添加文案反馈
*
* @param request AddTextFeedbackRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return AddTextFeedbackResponse
*/
async function addTextFeedbackWithOptions(request: AddTextFeedbackRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AddTextFeedbackResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.content)) {
body['content'] = request.content;
}
if (!Util.isUnset(request.quality)) {
body['quality'] = request.quality;
}
if (!Util.isUnset(request.textId)) {
body['textId'] = request.textId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'AddTextFeedback',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/addTextFeedback`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 添加文案反馈
*
* @param request AddTextFeedbackRequest
* @return AddTextFeedbackResponse
*/
async function addTextFeedback(request: AddTextFeedbackRequest): AddTextFeedbackResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return addTextFeedbackWithOptions(request, headers, runtime);
}
model BatchAddDocumentRequest {
addDocumentInfos?: [
AddDocumentInfo
](name='addDocumentInfos'),
}
model BatchAddDocumentResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchAddDocumentResult
}
/**
* @summary 批量添加知识文档
*
* @param request BatchAddDocumentRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchAddDocumentResponse
*/
async function batchAddDocumentWithOptions(knowledgeBaseId: string, request: BatchAddDocumentRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchAddDocumentResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.addDocumentInfos)) {
body['addDocumentInfos'] = request.addDocumentInfos;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'BatchAddDocument',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/knowledge-base/${OpenApiUtil.getEncodeParam(knowledgeBaseId)}/documents`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量添加知识文档
*
* @param request BatchAddDocumentRequest
* @return BatchAddDocumentResponse
*/
async function batchAddDocument(knowledgeBaseId: string, request: BatchAddDocumentRequest): BatchAddDocumentResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchAddDocumentWithOptions(knowledgeBaseId, request, headers, runtime);
}
model BatchCreateAICoachTaskRequest {
requestId?: string(name='requestId', example='7915125A-0D96-5A25-A54B-D3B739A86AFC'),
scriptRecordId?: string(name='scriptRecordId', example='1'),
studentIds?: [ string ](name='studentIds'),
studentList?: [
{
studentAudioUrl?: string(name='studentAudioUrl'),
studentId?: string(name='studentId'),
}
](name='studentList'),
}
model BatchCreateAICoachTaskResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='10923AA3-F7A1-5EA0-ACCA-D704269EAA78'),
taskIds?: [ string ](name='taskIds'),
}
model BatchCreateAICoachTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchCreateAICoachTaskResponseBody(name='body'),
}
/**
* @summary 批量发布剧本任务
*
* @param request BatchCreateAICoachTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchCreateAICoachTaskResponse
*/
async function batchCreateAICoachTaskWithOptions(request: BatchCreateAICoachTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchCreateAICoachTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.requestId)) {
body['requestId'] = request.requestId;
}
if (!Util.isUnset(request.scriptRecordId)) {
body['scriptRecordId'] = request.scriptRecordId;
}
if (!Util.isUnset(request.studentIds)) {
body['studentIds'] = request.studentIds;
}
if (!Util.isUnset(request.studentList)) {
body['studentList'] = request.studentList;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'BatchCreateAICoachTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/batchCreateTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量发布剧本任务
*
* @param request BatchCreateAICoachTaskRequest
* @return BatchCreateAICoachTaskResponse
*/
async function batchCreateAICoachTask(request: BatchCreateAICoachTaskRequest): BatchCreateAICoachTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchCreateAICoachTaskWithOptions(request, headers, runtime);
}
model BatchGetProjectTaskRequest {
taskIdList?: [ string ](name='taskIdList'),
}
model BatchGetProjectTaskShrinkRequest {
taskIdListShrink?: string(name='taskIdList'),
}
model BatchGetProjectTaskResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='11'),
resultList?: [
{
errorMsg?: string(name='errorMsg'),
status?: string(name='status', example='SUCCESS'),
taskId?: string(name='taskId', example='11'),
videoDownloadUrl?: string(name='videoDownloadUrl', example='http'),
videoDuration?: int32(name='videoDuration', example='1000'),
videoUrl?: string(name='videoUrl', example='http'),
}
](name='resultList'),
}
model BatchGetProjectTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchGetProjectTaskResponseBody(name='body'),
}
/**
* @summary 批量查询项目信息
*
* @param tmpReq BatchGetProjectTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchGetProjectTaskResponse
*/
async function batchGetProjectTaskWithOptions(tmpReq: BatchGetProjectTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchGetProjectTaskResponse {
Util.validateModel(tmpReq);
var request = new BatchGetProjectTaskShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.taskIdList)) {
request.taskIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.taskIdList, 'taskIdList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.taskIdListShrink)) {
query['taskIdList'] = request.taskIdListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'BatchGetProjectTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/project/batchGetProjectTask`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量查询项目信息
*
* @param request BatchGetProjectTaskRequest
* @return BatchGetProjectTaskResponse
*/
async function batchGetProjectTask(request: BatchGetProjectTaskRequest): BatchGetProjectTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchGetProjectTaskWithOptions(request, headers, runtime);
}
model BatchGetTrainTaskRequest {
aliyunMainId?: string(name='aliyunMainId', example='1524004782431111'),
taskIdList?: [ string ](name='taskIdList'),
}
model BatchGetTrainTaskShrinkRequest {
aliyunMainId?: string(name='aliyunMainId', example='1524004782431111'),
taskIdListShrink?: string(name='taskIdList'),
}
model BatchGetTrainTaskResponseBody = {
requestId?: string(name='requestId', example='2226A26A-26E5-5AB9-A14A-54D612FCF96A'),
voiceList?: [
{
aliyunSubId?: string(name='aliyunSubId', example='1524004782438111'),
auditFailMessage?: string(name='auditFailMessage'),
auditStatus?: string(name='auditStatus', example='auditFail'),
createTime?: string(name='createTime', example='yyyy-MM-dd HH:mm:ss'),
gender?: string(name='gender', example='M'),
name?: string(name='name'),
resSpecType?: string(name='resSpecType', example='BASIC_MODEL'),
taskId?: string(name='taskId', example='837091359375048704'),
taskType?: string(name='taskType', example='CopyVoice'),
trainFailMessage?: string(name='trainFailMessage'),
trainStatus?: string(name='trainStatus', example='trainFail'),
useScene?: string(name='useScene', example='realTimeInteractivity'),
voiceMaterial?: {
voiceId?: long(name='voiceId', example='1'),
voiceLanguage?: string(name='voiceLanguage', example='zh'),
voiceUrl?: string(name='voiceUrl', example='http://www.voice.com'),
}(name='voiceMaterial'),
}
](name='voiceList'),
}
model BatchGetTrainTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchGetTrainTaskResponseBody(name='body'),
}
/**
* @summary 批量查询声音复刻任务
*
* @param tmpReq BatchGetTrainTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchGetTrainTaskResponse
*/
async function batchGetTrainTaskWithOptions(tmpReq: BatchGetTrainTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchGetTrainTaskResponse {
Util.validateModel(tmpReq);
var request = new BatchGetTrainTaskShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.taskIdList)) {
request.taskIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.taskIdList, 'taskIdList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.aliyunMainId)) {
query['aliyunMainId'] = request.aliyunMainId;
}
if (!Util.isUnset(request.taskIdListShrink)) {
query['taskIdList'] = request.taskIdListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'BatchGetTrainTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/train/task/batchGetTrainTaskInfo`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量查询声音复刻任务
*
* @param request BatchGetTrainTaskRequest
* @return BatchGetTrainTaskResponse
*/
async function batchGetTrainTask(request: BatchGetTrainTaskRequest): BatchGetTrainTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchGetTrainTaskWithOptions(request, headers, runtime);
}
model BatchGetVideoClipTaskRequest {
taskIdList?: [ string ](name='taskIdList'),
}
model BatchGetVideoClipTaskShrinkRequest {
taskIdListShrink?: string(name='taskIdList'),
}
model BatchGetVideoClipTaskResponseBody = {
requestId?: string(name='requestId', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
taskList?: [
{
status?: string(name='status', example='FINISHED'),
taskId?: string(name='taskId', example='864413342857035776'),
totalDuration?: double(name='totalDuration', example='43335'),
totalToken?: long(name='totalToken', example='11'),
videoList?: [
{
beginTime?: int32(name='beginTime', example='0'),
description?: string(name='description'),
endTime?: int32(name='endTime', example='11110'),
errorMsg?: string(name='errorMsg'),
title?: string(name='title'),
videoDownloadUrl?: string(name='videoDownloadUrl', example='https://e-ai.oss-cn-guangzhou.aliyuncs.com/video/jlkasdl.mp4'),
videoName?: string(name='videoName'),
videoUrl?: string(name='videoUrl', example='https://e-ai.oss-cn-guangzhou.aliyuncs.com/video/jlkasdl.mp4'),
}
](name='videoList'),
}
](name='taskList'),
}
model BatchGetVideoClipTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchGetVideoClipTaskResponseBody(name='body'),
}
/**
* @summary 批量查询视频切片任务信息
*
* @param tmpReq BatchGetVideoClipTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchGetVideoClipTaskResponse
*/
async function batchGetVideoClipTaskWithOptions(tmpReq: BatchGetVideoClipTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchGetVideoClipTaskResponse {
Util.validateModel(tmpReq);
var request = new BatchGetVideoClipTaskShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.taskIdList)) {
request.taskIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.taskIdList, 'taskIdList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.taskIdListShrink)) {
query['taskIdList'] = request.taskIdListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'BatchGetVideoClipTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/video/clip/batchGetVideoClipTask`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量查询视频切片任务信息
*
* @param request BatchGetVideoClipTaskRequest
* @return BatchGetVideoClipTaskResponse
*/
async function batchGetVideoClipTask(request: BatchGetVideoClipTaskRequest): BatchGetVideoClipTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchGetVideoClipTaskWithOptions(request, headers, runtime);
}
model BatchQueryIndividuationTextRequest {
textIdList?: [ string ](name='textIdList'),
}
model BatchQueryIndividuationTextShrinkRequest {
textIdListShrink?: string(name='textIdList'),
}
model BatchQueryIndividuationTextResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='14878724-A835-578D-9DD5-4779ADCE9221'),
textList?: [
{
content?: string(name='content'),
createTime?: string(name='createTime', example='yyyy-MM-dd HH:mm:ss'),
errorMsg?: string(name='errorMsg', example='1'),
itemId?: string(name='itemId', example='2849286'),
projectId?: string(name='projectId', example='812884915104530432'),
status?: string(name='status', example='1'),
taskId?: string(name='taskId', example='837074737851613184'),
textId?: string(name='textId', example='110825'),
updateTime?: string(name='updateTime', example='yyyy-MM-dd HH:mm:ss'),
userId?: string(name='userId', example='11'),
}
](name='textList'),
}
model BatchQueryIndividuationTextResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BatchQueryIndividuationTextResponseBody(name='body'),
}
/**
* @summary 批量查询文案
*
* @param tmpReq BatchQueryIndividuationTextRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return BatchQueryIndividuationTextResponse
*/
async function batchQueryIndividuationTextWithOptions(tmpReq: BatchQueryIndividuationTextRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchQueryIndividuationTextResponse {
Util.validateModel(tmpReq);
var request = new BatchQueryIndividuationTextShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.textIdList)) {
request.textIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.textIdList, 'textIdList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.textIdListShrink)) {
query['textIdList'] = request.textIdListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'BatchQueryIndividuationText',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/batchQueryText`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量查询文案
*
* @param request BatchQueryIndividuationTextRequest
* @return BatchQueryIndividuationTextResponse
*/
async function batchQueryIndividuationText(request: BatchQueryIndividuationTextRequest): BatchQueryIndividuationTextResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return batchQueryIndividuationTextWithOptions(request, headers, runtime);
}
model CheckSessionRequest {
projectId?: string(name='projectId', example='11111'),
sessionId?: string(name='sessionId', example='121dlsga4o7golrl1hoja'),
}
model CheckSessionResponseBody = {
requestId?: string(name='requestId', example='5389BE87-571B-573C-90ED-F07C5E68760B'),
status?: string(name='status', example='FREE'),
}
model CheckSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CheckSessionResponseBody(name='body'),
}
/**
* @summary 检查会话状态
*
* @param request CheckSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CheckSessionResponse
*/
async function checkSessionWithOptions(request: CheckSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CheckSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CheckSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/checkSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 检查会话状态
*
* @param request CheckSessionRequest
* @return CheckSessionResponse
*/
async function checkSession(request: CheckSessionRequest): CheckSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return checkSessionWithOptions(request, headers, runtime);
}
model CloseAICoachTaskSessionRequest {
sessionId?: string(name='sessionId', example='11'),
uid?: string(name='uid', example='273610276967782972'),
}
model CloseAICoachTaskSessionResponseBody = {
requestId?: string(name='requestId', example='0E06E0AA-D5B6-538C-8CE9-BAB79C68B690'),
status?: string(name='status'),
}
model CloseAICoachTaskSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CloseAICoachTaskSessionResponseBody(name='body'),
}
/**
* @summary 学员关闭会话
*
* @param request CloseAICoachTaskSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CloseAICoachTaskSessionResponse
*/
async function closeAICoachTaskSessionWithOptions(request: CloseAICoachTaskSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CloseAICoachTaskSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
if (!Util.isUnset(request.uid)) {
body['uid'] = request.uid;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CloseAICoachTaskSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/closeSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 学员关闭会话
*
* @param request CloseAICoachTaskSessionRequest
* @return CloseAICoachTaskSessionResponse
*/
async function closeAICoachTaskSession(request: CloseAICoachTaskSessionRequest): CloseAICoachTaskSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return closeAICoachTaskSessionWithOptions(request, headers, runtime);
}
model CountTextRequest {
generationSource?: string(name='generationSource', description='API', example='PLATFORM'),
industry?: string(name='industry', example='Garment'),
publishStatus?: string(name='publishStatus', example='1'),
style?: string(name='style', example='RED_BOOK'),
}
model CountTextResponseBody = {
requestId?: string(name='RequestId', example='6C9CB64D-E2D3-5BF2-A9E6-2445F952F178'),
countTextCmdList?: [
{
count?: long(name='count', example='4'),
theme?: string(name='theme', example='RED_BOOK'),
}
](name='countTextCmdList'),
}
model CountTextResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CountTextResponseBody(name='body'),
}
/**
* @summary 文本数量统计
*
* @param request CountTextRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CountTextResponse
*/
async function countTextWithOptions(request: CountTextRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CountTextResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.generationSource)) {
query['generationSource'] = request.generationSource;
}
if (!Util.isUnset(request.industry)) {
query['industry'] = request.industry;
}
if (!Util.isUnset(request.publishStatus)) {
query['publishStatus'] = request.publishStatus;
}
if (!Util.isUnset(request.style)) {
query['style'] = request.style;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CountText',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/countText`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 文本数量统计
*
* @param request CountTextRequest
* @return CountTextResponse
*/
async function countText(request: CountTextRequest): CountTextResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return countTextWithOptions(request, headers, runtime);
}
model CreateAICoachTaskRequest {
requestId?: string(name='requestId', example='541E7123-2E8A-5BA2-AC38-665650C84129'),
scriptRecordId?: string(name='scriptRecordId'),
studentAudioUrl?: string(name='studentAudioUrl'),
studentId?: string(name='studentId'),
}
model CreateAICoachTaskResponseBody = {
errorCode?: string(name='errorCode', example='Deduct.DeductTaskAlreadySuccess'),
errorMessage?: string(name='errorMessage'),
requestId?: string(name='requestId', description='Id of the request', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
success?: boolean(name='success', example='true'),
taskId?: string(name='taskId', example='821882330423951360'),
}
model CreateAICoachTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateAICoachTaskResponseBody(name='body'),
}
/**
* @summary 查询剧本列表
*
* @param request CreateAICoachTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateAICoachTaskResponse
*/
async function createAICoachTaskWithOptions(request: CreateAICoachTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateAICoachTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.requestId)) {
body['requestId'] = request.requestId;
}
if (!Util.isUnset(request.scriptRecordId)) {
body['scriptRecordId'] = request.scriptRecordId;
}
if (!Util.isUnset(request.studentAudioUrl)) {
body['studentAudioUrl'] = request.studentAudioUrl;
}
if (!Util.isUnset(request.studentId)) {
body['studentId'] = request.studentId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateAICoachTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/createTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询剧本列表
*
* @param request CreateAICoachTaskRequest
* @return CreateAICoachTaskResponse
*/
async function createAICoachTask(request: CreateAICoachTaskRequest): CreateAICoachTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createAICoachTaskWithOptions(request, headers, runtime);
}
model CreateAICoachTaskSessionRequest {
taskId?: string(name='taskId', example='821882330423951360'),
uid?: string(name='uid', example='1730530943640489'),
}
model CreateAICoachTaskSessionResponseBody = {
channelToken?: string(name='channelToken', description='rtctoken', example='11'),
requestId?: string(name='requestId', example='4830493A-728F-5F19-BBCC-1443292E9C49'),
scriptInfo?: {
agentIconUrl?: string(name='agentIconUrl'),
characterName?: string(name='characterName'),
dialogueTextFlag?: boolean(name='dialogueTextFlag'),
dialogueTipFlag?: boolean(name='dialogueTipFlag'),
initiator?: string(name='initiator'),
inputTypeList?: [ string ](name='inputTypeList'),
maxDuration?: long(name='maxDuration', example='11'),
scriptDesc?: string(name='scriptDesc', example='test'),
scriptName?: string(name='scriptName'),
scriptRecordId?: string(name='scriptRecordId'),
scriptType?: long(name='scriptType'),
sparringTipContent?: string(name='sparringTipContent'),
sparringTipTitle?: string(name='sparringTipTitle'),
studentThinkTimeFlag?: boolean(name='studentThinkTimeFlag'),
studentThinkTimeLimit?: long(name='studentThinkTimeLimit'),
}(name='scriptInfo'),
sessionId?: string(name='sessionId', example='111'),
sessionStatus?: long(name='sessionStatus'),
token?: string(name='token', description='Token', example='11'),
webSocketUrl?: string(name='webSocketUrl', example='11'),
}
model CreateAICoachTaskSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateAICoachTaskSessionResponseBody(name='body'),
}
/**
* @summary 学员开启对练会话
*
* @param request CreateAICoachTaskSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateAICoachTaskSessionResponse
*/
async function createAICoachTaskSessionWithOptions(request: CreateAICoachTaskSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateAICoachTaskSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.taskId)) {
body['taskId'] = request.taskId;
}
if (!Util.isUnset(request.uid)) {
body['uid'] = request.uid;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateAICoachTaskSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/startSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 学员开启对练会话
*
* @param request CreateAICoachTaskSessionRequest
* @return CreateAICoachTaskSessionResponse
*/
async function createAICoachTaskSession(request: CreateAICoachTaskSessionRequest): CreateAICoachTaskSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createAICoachTaskSessionWithOptions(request, headers, runtime);
}
model CreateAnchorRequest {
anchorCategory?: string(name='anchorCategory'),
anchorMaterialName?: string(name='anchorMaterialName'),
coverUrl?: string(name='coverUrl', example='https://yic-pre.oss-cn-hangzhou.aliyuncs.com/common/image/anchor/1733474220549-1733474198960image.png?Expires=3311144948&OSSAccessKeyId=LTAI5tPHLyFPhh4UoRias4Zg&Signature=qldDufvRDj9IUTmOtb9r2451RIU%3D'),
digitalHumanType?: string(name='digitalHumanType'),
gender?: string(name='gender', example='F'),
useScene?: string(name='useScene', example='offlineSynthesis'),
videoOssKey?: string(name='videoOssKey'),
}
model CreateAnchorResponseBody = {
data?: string(name='data', description='123456789'),
errorCode?: string(name='errorCode', example='PARAM_ERROR'),
errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
requestId?: string(name='requestId', description='Id of the request', example='10923AA3-F7A1-5EA0-ACCA-D704269EAA78'),
success?: boolean(name='success', example='true'),
}
model CreateAnchorResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateAnchorResponseBody(name='body'),
}
/**
* @summary 创建照片数字人
*
* @param request CreateAnchorRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateAnchorResponse
*/
async function createAnchorWithOptions(request: CreateAnchorRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateAnchorResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.anchorCategory)) {
body['anchorCategory'] = request.anchorCategory;
}
if (!Util.isUnset(request.anchorMaterialName)) {
body['anchorMaterialName'] = request.anchorMaterialName;
}
if (!Util.isUnset(request.coverUrl)) {
body['coverUrl'] = request.coverUrl;
}
if (!Util.isUnset(request.digitalHumanType)) {
body['digitalHumanType'] = request.digitalHumanType;
}
if (!Util.isUnset(request.gender)) {
body['gender'] = request.gender;
}
if (!Util.isUnset(request.useScene)) {
body['useScene'] = request.useScene;
}
if (!Util.isUnset(request.videoOssKey)) {
body['videoOssKey'] = request.videoOssKey;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateAnchor',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/anchorOpen/createAnchor`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建照片数字人
*
* @param request CreateAnchorRequest
* @return CreateAnchorResponse
*/
async function createAnchor(request: CreateAnchorRequest): CreateAnchorResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createAnchorWithOptions(request, headers, runtime);
}
model CreateIllustrationTaskRequest {
body?: IllustrationTaskCreateCmd(name='body'),
}
model CreateIllustrationTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: IllustrationTaskResult
}
/**
* @summary 创建配图生成任务
*
* @param request CreateIllustrationTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateIllustrationTaskResponse
*/
async function createIllustrationTaskWithOptions(textId: string, request: CreateIllustrationTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateIllustrationTaskResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(request.body),
};
var params = new OpenApi.Params{
action = 'CreateIllustrationTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts/${OpenApiUtil.getEncodeParam(textId)}/illustrationTasks`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建配图生成任务
*
* @param request CreateIllustrationTaskRequest
* @return CreateIllustrationTaskResponse
*/
async function createIllustrationTask(textId: string, request: CreateIllustrationTaskRequest): CreateIllustrationTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createIllustrationTaskWithOptions(textId, request, headers, runtime);
}
model CreateIndividuationProjectRequest {
projectInfo?: string(name='projectInfo'),
projectName?: string(name='projectName', example='avatar-1'),
purpose?: string(name='purpose'),
sceneId?: string(name='sceneId', example='ail003'),
}
model CreateIndividuationProjectResponseBody = {
projectId?: string(name='projectId', example='812907463682949120'),
requestId?: string(name='requestId', description='Id of the request', example='4D902811-B75C-5D1B-8882-D515F8E2F977'),
}
model CreateIndividuationProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateIndividuationProjectResponseBody(name='body'),
}
/**
* @summary 创建个性化文案项目
*
* @param request CreateIndividuationProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateIndividuationProjectResponse
*/
async function createIndividuationProjectWithOptions(request: CreateIndividuationProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateIndividuationProjectResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.projectInfo)) {
body['projectInfo'] = request.projectInfo;
}
if (!Util.isUnset(request.projectName)) {
body['projectName'] = request.projectName;
}
if (!Util.isUnset(request.purpose)) {
body['purpose'] = request.purpose;
}
if (!Util.isUnset(request.sceneId)) {
body['sceneId'] = request.sceneId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateIndividuationProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/createProject`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建个性化文案项目
*
* @param request CreateIndividuationProjectRequest
* @return CreateIndividuationProjectResponse
*/
async function createIndividuationProject(request: CreateIndividuationProjectRequest): CreateIndividuationProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createIndividuationProjectWithOptions(request, headers, runtime);
}
model CreateIndividuationTextTaskRequest {
crowdPack?: [[ string ] ](name='crowdPack'),
projectId?: string(name='projectId', example='840015278620459008'),
taskName?: string(name='taskName'),
}
model CreateIndividuationTextTaskResponseBody = {
requestId?: string(name='requestId', example='56AC346B-AF40-5E4F-AFFE-FD8BA5E6FB3A'),
taskId?: string(name='taskId', example='837091359375048704'),
}
model CreateIndividuationTextTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateIndividuationTextTaskResponseBody(name='body'),
}
/**
* @summary 创建个性化文案任务
*
* @param request CreateIndividuationTextTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateIndividuationTextTaskResponse
*/
async function createIndividuationTextTaskWithOptions(request: CreateIndividuationTextTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateIndividuationTextTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.crowdPack)) {
body['crowdPack'] = request.crowdPack;
}
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.taskName)) {
body['taskName'] = request.taskName;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateIndividuationTextTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/createTextTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建个性化文案任务
*
* @param request CreateIndividuationTextTaskRequest
* @return CreateIndividuationTextTaskResponse
*/
async function createIndividuationTextTask(request: CreateIndividuationTextTaskRequest): CreateIndividuationTextTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createIndividuationTextTaskWithOptions(request, headers, runtime);
}
model CreateProductImageRequest {
backgroundDescription?: string(name='backgroundDescription'),
backgroundPriority?: int32(name='backgroundPriority', example='75'),
backgroundUrl?: string(name='backgroundUrl', example='http://xxx/background.png'),
highlightText?: string(name='highlightText'),
imageCount?: int32(name='imageCount', example='1'),
imageUrl?: string(name='imageUrl', example='http://xxx/image.png'),
subTitle?: string(name='subTitle'),
title?: string(name='title'),
}
model CreateProductImageResponseBody = {
requestId?: string(name='requestId', example='3239281273464326823'),
taskId?: string(name='taskId', example='837091359375048704'),
}
model CreateProductImageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateProductImageResponseBody(name='body'),
}
/**
* @summary 创建产品图
*
* @param request CreateProductImageRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateProductImageResponse
*/
async function createProductImageWithOptions(request: CreateProductImageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateProductImageResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.backgroundDescription)) {
body['backgroundDescription'] = request.backgroundDescription;
}
if (!Util.isUnset(request.backgroundPriority)) {
body['backgroundPriority'] = request.backgroundPriority;
}
if (!Util.isUnset(request.backgroundUrl)) {
body['backgroundUrl'] = request.backgroundUrl;
}
if (!Util.isUnset(request.highlightText)) {
body['highlightText'] = request.highlightText;
}
if (!Util.isUnset(request.imageCount)) {
body['imageCount'] = request.imageCount;
}
if (!Util.isUnset(request.imageUrl)) {
body['imageUrl'] = request.imageUrl;
}
if (!Util.isUnset(request.subTitle)) {
body['subTitle'] = request.subTitle;
}
if (!Util.isUnset(request.title)) {
body['title'] = request.title;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateProductImage',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/images/products`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建产品图
*
* @param request CreateProductImageRequest
* @return CreateProductImageResponse
*/
async function createProductImage(request: CreateProductImageRequest): CreateProductImageResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createProductImageWithOptions(request, headers, runtime);
}
model CreateRealisticPortraitRequest {
ages?: [ int32 ](name='ages'),
cloth?: int32(name='cloth', example='1'),
color?: int32(name='color', example='1'),
custom?: string(name='custom', example='11'),
face?: [ int32 ](name='face'),
figure?: int32(name='figure', example='1'),
gender?: int32(name='gender', example='1'),
hairColor?: int32(name='hairColor', example='1'),
hairstyle?: int32(name='hairstyle', example='1'),
height?: int32(name='height', example='500'),
imageUrl?: string(name='imageUrl'),
numbers?: int32(name='numbers', example='4'),
ratio?: string(name='ratio', example='1:1'),
width?: int32(name='width', example='500'),
}
model CreateRealisticPortraitResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='D5798660-1531-5D12-9C20-16FEE9D22351'),
taskId?: string(name='taskId', example='313123123'),
}
model CreateRealisticPortraitResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateRealisticPortraitResponseBody(name='body'),
}
/**
* @summary 写实人像创作
*
* @param request CreateRealisticPortraitRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateRealisticPortraitResponse
*/
async function createRealisticPortraitWithOptions(request: CreateRealisticPortraitRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateRealisticPortraitResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.ages)) {
body['ages'] = request.ages;
}
if (!Util.isUnset(request.cloth)) {
body['cloth'] = request.cloth;
}
if (!Util.isUnset(request.color)) {
body['color'] = request.color;
}
if (!Util.isUnset(request.custom)) {
body['custom'] = request.custom;
}
if (!Util.isUnset(request.face)) {
body['face'] = request.face;
}
if (!Util.isUnset(request.figure)) {
body['figure'] = request.figure;
}
if (!Util.isUnset(request.gender)) {
body['gender'] = request.gender;
}
if (!Util.isUnset(request.hairColor)) {
body['hairColor'] = request.hairColor;
}
if (!Util.isUnset(request.hairstyle)) {
body['hairstyle'] = request.hairstyle;
}
if (!Util.isUnset(request.height)) {
body['height'] = request.height;
}
if (!Util.isUnset(request.imageUrl)) {
body['imageUrl'] = request.imageUrl;
}
if (!Util.isUnset(request.numbers)) {
body['numbers'] = request.numbers;
}
if (!Util.isUnset(request.ratio)) {
body['ratio'] = request.ratio;
}
if (!Util.isUnset(request.width)) {
body['width'] = request.width;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateRealisticPortrait',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/images/portrait/realistic`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 写实人像创作
*
* @param request CreateRealisticPortraitRequest
* @return CreateRealisticPortraitResponse
*/
async function createRealisticPortrait(request: CreateRealisticPortraitRequest): CreateRealisticPortraitResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createRealisticPortraitWithOptions(request, headers, runtime);
}
model CreateTextTaskRequest {
body?: TextTaskCreateCmd(name='body'),
}
model CreateTextTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TextTaskResult
}
/**
* @summary 创建文案生成任务
*
* @param request CreateTextTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateTextTaskResponse
*/
async function createTextTaskWithOptions(request: CreateTextTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateTextTaskResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(request.body),
};
var params = new OpenApi.Params{
action = 'CreateTextTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/textTasks`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 创建文案生成任务
*
* @param request CreateTextTaskRequest
* @return CreateTextTaskResponse
*/
async function createTextTask(request: CreateTextTaskRequest): CreateTextTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createTextTaskWithOptions(request, headers, runtime);
}
model CreateTrainTaskRequest {
aliyunMainId?: string(name='aliyunMainId', example='13168123111'),
resSpecType?: string(name='resSpecType', example='BASIC_MODEL'),
taskType?: string(name='taskType', example='CopyAnchorAndVoice'),
useScene?: string(name='useScene', example='realTimeInteractivity'),
voiceGender?: string(name='voiceGender', example='M'),
voiceLanguage?: string(name='voiceLanguage', example='zh'),
voiceName?: string(name='voiceName'),
voicePath?: string(name='voicePath', example='https://yic-pre/video/test-0513.mp3'),
}
model CreateTrainTaskResponseBody = {
requestId?: string(name='requestId', example='84657DE0-B68C-508B-AFE7-8ED921854E3C'),
taskId?: string(name='taskId', example='837091359375048704'),
}
model CreateTrainTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateTrainTaskResponseBody(name='body'),
}
/**
* @summary 提交声音复刻任务
*
* @param request CreateTrainTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateTrainTaskResponse
*/
async function createTrainTaskWithOptions(request: CreateTrainTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateTrainTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.aliyunMainId)) {
body['aliyunMainId'] = request.aliyunMainId;
}
if (!Util.isUnset(request.resSpecType)) {
body['resSpecType'] = request.resSpecType;
}
if (!Util.isUnset(request.taskType)) {
body['taskType'] = request.taskType;
}
if (!Util.isUnset(request.useScene)) {
body['useScene'] = request.useScene;
}
if (!Util.isUnset(request.voiceGender)) {
body['voiceGender'] = request.voiceGender;
}
if (!Util.isUnset(request.voiceLanguage)) {
body['voiceLanguage'] = request.voiceLanguage;
}
if (!Util.isUnset(request.voiceName)) {
body['voiceName'] = request.voiceName;
}
if (!Util.isUnset(request.voicePath)) {
body['voicePath'] = request.voicePath;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateTrainTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/train/task/createTrainTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 提交声音复刻任务
*
* @param request CreateTrainTaskRequest
* @return CreateTrainTaskResponse
*/
async function createTrainTask(request: CreateTrainTaskRequest): CreateTrainTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createTrainTaskWithOptions(request, headers, runtime);
}
model CreateVideoClipTaskRequest {
aliyunMainId?: string(name='aliyunMainId', example='1314445556'),
description?: string(name='description'),
ossKeys?: [ string ](name='ossKeys'),
requirement?: string(name='requirement'),
}
model CreateVideoClipTaskResponseBody = {
requestId?: string(name='requestId', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
taskId?: string(name='taskId', example='837091359375048704'),
}
model CreateVideoClipTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateVideoClipTaskResponseBody(name='body'),
}
/**
* @summary 提交视频切片任务
*
* @param request CreateVideoClipTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return CreateVideoClipTaskResponse
*/
async function createVideoClipTaskWithOptions(request: CreateVideoClipTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateVideoClipTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.aliyunMainId)) {
body['aliyunMainId'] = request.aliyunMainId;
}
if (!Util.isUnset(request.description)) {
body['description'] = request.description;
}
if (!Util.isUnset(request.ossKeys)) {
body['ossKeys'] = request.ossKeys;
}
if (!Util.isUnset(request.requirement)) {
body['requirement'] = request.requirement;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateVideoClipTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/video/clip/createVideoClipTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 提交视频切片任务
*
* @param request CreateVideoClipTaskRequest
* @return CreateVideoClipTaskResponse
*/
async function createVideoClipTask(request: CreateVideoClipTaskRequest): CreateVideoClipTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return createVideoClipTaskWithOptions(request, headers, runtime);
}
model DeleteIndividuationProjectRequest {
projectId?: string(name='projectId', example='840015278620459008'),
}
model DeleteIndividuationProjectResponseBody = {
desc?: string(name='desc'),
requestId?: string(name='requestId', description='Id of the request', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
status?: string(name='status', example='SUCCESS'),
}
model DeleteIndividuationProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteIndividuationProjectResponseBody(name='body'),
}
/**
* @summary 删除个性化文案项目
*
* @param request DeleteIndividuationProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteIndividuationProjectResponse
*/
async function deleteIndividuationProjectWithOptions(request: DeleteIndividuationProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteIndividuationProjectResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DeleteIndividuationProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/deleteProject`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 删除个性化文案项目
*
* @param request DeleteIndividuationProjectRequest
* @return DeleteIndividuationProjectResponse
*/
async function deleteIndividuationProject(request: DeleteIndividuationProjectRequest): DeleteIndividuationProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return deleteIndividuationProjectWithOptions(request, headers, runtime);
}
model DeleteIndividuationTextRequest {
textIdList?: [ string ](name='textIdList'),
}
model DeleteIndividuationTextResponseBody = {
desc?: string(name='desc'),
requestId?: string(name='requestId', description='Id of the request', example='4830493A-728F-5F19-BBCC-1443292E9C49'),
status?: string(name='status', example='SUCCESS'),
}
model DeleteIndividuationTextResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteIndividuationTextResponseBody(name='body'),
}
/**
* @summary 删除个性化文案
*
* @param request DeleteIndividuationTextRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteIndividuationTextResponse
*/
async function deleteIndividuationTextWithOptions(request: DeleteIndividuationTextRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteIndividuationTextResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.textIdList)) {
body['textIdList'] = request.textIdList;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DeleteIndividuationText',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/deleteText`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 删除个性化文案
*
* @param request DeleteIndividuationTextRequest
* @return DeleteIndividuationTextResponse
*/
async function deleteIndividuationText(request: DeleteIndividuationTextRequest): DeleteIndividuationTextResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return deleteIndividuationTextWithOptions(request, headers, runtime);
}
model DescribeDocumentResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DocumentResult
}
/**
* @summary 查询文档信息与状态
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDocumentResponse
*/
async function describeDocumentWithOptions(knowledgeBaseId: string, documentId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeDocumentResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'DescribeDocument',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/knowledge-base/${OpenApiUtil.getEncodeParam(knowledgeBaseId)}/documents/${OpenApiUtil.getEncodeParam(documentId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询文档信息与状态
*
* @return DescribeDocumentResponse
*/
async function describeDocument(knowledgeBaseId: string, documentId: string): DescribeDocumentResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return describeDocumentWithOptions(knowledgeBaseId, documentId, headers, runtime);
}
model FinishAICoachTaskSessionRequest {
sessionId?: string(name='sessionId', example='111'),
uid?: string(name='uid', example='222'),
}
model FinishAICoachTaskSessionResponseBody = {
requestId?: string(name='requestId', example='14878724-A835-578D-9DD5-4779ADCE9221'),
status?: string(name='status'),
}
model FinishAICoachTaskSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: FinishAICoachTaskSessionResponseBody(name='body'),
}
/**
* @summary 学员完成会话
*
* @param request FinishAICoachTaskSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return FinishAICoachTaskSessionResponse
*/
async function finishAICoachTaskSessionWithOptions(request: FinishAICoachTaskSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): FinishAICoachTaskSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
if (!Util.isUnset(request.uid)) {
body['uid'] = request.uid;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'FinishAICoachTaskSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/finishSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 学员完成会话
*
* @param request FinishAICoachTaskSessionRequest
* @return FinishAICoachTaskSessionResponse
*/
async function finishAICoachTaskSession(request: FinishAICoachTaskSessionRequest): FinishAICoachTaskSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return finishAICoachTaskSessionWithOptions(request, headers, runtime);
}
model GetAICoachAssessmentPointRequest {
pointId?: string(name='pointId', example='1'),
}
model GetAICoachAssessmentPointResponseBody = {
answerList?: [
{
answerValues?: [
{
answerName?: string(name='answerName', example='demo'),
answerWeight?: int32(name='answerWeight', example='50'),
keywordValues?: [
{
name?: string(name='name', example='demo'),
weight?: int32(name='weight', example='50'),
}
](name='keywordValues'),
keywordWeight?: int32(name='keywordWeight', example='50'),
scoringRules?: [
{
name?: string(name='name', example='demo'),
}
](name='scoringRules'),
}
](name='answerValues'),
enabledKeyword?: boolean(name='enabledKeyword', example='true'),
nameList?: [ string ](name='nameList'),
operators?: string(name='operators', example='and'),
parameters?: [
{
name?: string(name='name', example='demo'),
value?: string(name='value', example='441323200602114284'),
}
](name='parameters'),
type?: string(name='type', example='custom'),
weight?: int32(name='weight', example='100'),
}
](name='answerList'),
citations?: int32(name='citations', example='10'),
documentId?: string(name='documentId', example='1'),
documentName?: string(name='documentName', example='demo'),
gmtCreate?: string(name='gmtCreate', example='2025-02-24 12:00:00'),
gmtModified?: string(name='gmtModified', example='2025-02-24 12:00:00'),
kbId?: string(name='kbId', example='1'),
kbType?: string(name='kbType', example='Cloudcode'),
knowledgeList?: [ string ](name='knowledgeList'),
name?: string(name='name', example='demo'),
pointId?: string(name='pointId'),
questionDescription?: string(name='questionDescription', example='demo'),
questionSample?: string(name='questionSample', example='demo'),
requestId?: string(name='requestId', description='Id of the request', example='4830493A-728F-5F19-BBCC-1443292E9C49'),
status?: string(name='status', example='DRAFT'),
}
model GetAICoachAssessmentPointResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAICoachAssessmentPointResponseBody(name='body'),
}
/**
* @summary 获取考核点详情
*
* @param request GetAICoachAssessmentPointRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetAICoachAssessmentPointResponse
*/
async function getAICoachAssessmentPointWithOptions(request: GetAICoachAssessmentPointRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAICoachAssessmentPointResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.pointId)) {
query['pointId'] = request.pointId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAICoachAssessmentPoint',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/getAssessmentPoint`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取考核点详情
*
* @param request GetAICoachAssessmentPointRequest
* @return GetAICoachAssessmentPointResponse
*/
async function getAICoachAssessmentPoint(request: GetAICoachAssessmentPointRequest): GetAICoachAssessmentPointResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getAICoachAssessmentPointWithOptions(request, headers, runtime);
}
model GetAICoachCheatDetectionRequest {
sessionId?: string(name='sessionId', example='79e954faffe2415ebd18188ba787d78e'),
}
model GetAICoachCheatDetectionResponseBody = {
cheatId?: string(name='cheatId', example='1'),
errorCode?: string(name='errorCode', example='success'),
errorMessage?: string(name='errorMessage'),
gmtCreate?: string(name='gmtCreate', example='2025-02-24 12:00:00'),
imageCheat?: {
desc?: string(name='desc', example='demo'),
list?: [
{
time?: string(name='time', example='2025-03-22 10:05:07'),
url?: string(name='url', example='https://demo.com'),
}
](name='list'),
status?: int32(name='status', example='1'),
}(name='imageCheat'),
requestId?: string(name='requestId', description='Id of the request', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
status?: int32(name='status', example='1'),
success?: boolean(name='success', description='true', example='True'),
voiceCheat?: {
comparisonList?: [
{
time?: string(name='time', example='2024-12-11 10:07:23'),
url?: string(name='url', example='https://demo.com'),
}
](name='comparisonList'),
desc?: string(name='desc', example='demo'),
originalList?: [
{
url?: string(name='url', example='https://demo.com'),
}
](name='originalList'),
status?: int32(name='status', example='1'),
}(name='voiceCheat'),
}
model GetAICoachCheatDetectionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAICoachCheatDetectionResponseBody(name='body'),
}
/**
* @summary 查询作弊检测详情
*
* @param request GetAICoachCheatDetectionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetAICoachCheatDetectionResponse
*/
async function getAICoachCheatDetectionWithOptions(request: GetAICoachCheatDetectionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAICoachCheatDetectionResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.sessionId)) {
query['sessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAICoachCheatDetection',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/getCheatDetection`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询作弊检测详情
*
* @param request GetAICoachCheatDetectionRequest
* @return GetAICoachCheatDetectionResponse
*/
async function getAICoachCheatDetection(request: GetAICoachCheatDetectionRequest): GetAICoachCheatDetectionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getAICoachCheatDetectionWithOptions(request, headers, runtime);
}
model GetAICoachScriptRequest {
scriptRecordId?: string(name='scriptRecordId', example='1'),
}
model GetAICoachScriptResponseBody = {
appendQuestionFlag?: boolean(name='appendQuestionFlag'),
assessmentScope?: string(name='assessmentScope', example='point'),
checkCheatConfig?: {
checkImage?: boolean(name='checkImage'),
checkVoice?: boolean(name='checkVoice'),
}(name='checkCheatConfig'),
closingRemarks?: string(name='closingRemarks'),
completeStrategy?: {
abnormalQuitSessionExpired?: int32(name='abnormalQuitSessionExpired', example='5'),
abnormalQuitSessionExpiredFlag?: boolean(name='abnormalQuitSessionExpiredFlag', example='true'),
clickCompleteAutoEnd?: boolean(name='clickCompleteAutoEnd', example='true'),
duration?: int32(name='duration', example='15'),
durationFlag?: boolean(name='durationFlag', example='true'),
fullCoverageAutoEnd?: boolean(name='fullCoverageAutoEnd', example='true'),
}(name='completeStrategy'),
coverUrl?: string(name='coverUrl', example='https://demo.com'),
dialogueInputTextLimit?: int32(name='dialogueInputTextLimit', example='500'),
dialogueTextFlag?: boolean(name='dialogueTextFlag', example='true'),
dialogueTipFlag?: boolean(name='dialogueTipFlag', example='true'),
dialogueVoiceLimit?: int32(name='dialogueVoiceLimit', example='30'),
evaluateReportFlag?: boolean(name='evaluateReportFlag', example='true'),
expressiveness?: map[string]int32(name='expressiveness'),
expressivenessList?: [
{
desc?: string(name='desc'),
enabled?: boolean(name='enabled'),
expressivenessId?: string(name='expressivenessId'),
name?: string(name='name'),
rule?: string(name='rule'),
type?: string(name='type'),
weight?: int32(name='weight'),
}
](name='expressivenessList'),
gifDynamicUrl?: string(name='gifDynamicUrl'),
gifStaticUrl?: string(name='gifStaticUrl'),
gmtCreate?: string(name='gmtCreate', example='2025-02-24 12:00:00'),
gmtModified?: string(name='gmtModified', example='2025-02-24 12:00:00'),
initiator?: string(name='initiator', example='coach'),
interactionInputTypes?: [ string ](name='interactionInputTypes'),
interactionType?: int32(name='interactionType', example='1'),
introduce?: string(name='introduce', example='demo'),
name?: string(name='name', example='demo'),
openingRemarks?: string(name='openingRemarks'),
orderAckFlag?: boolean(name='orderAckFlag', example='true'),
pointDeductionRuleList?: [
{
description?: string(name='description', example='demo'),
punishmentTypes?: [ string ](name='punishmentTypes'),
ruleValue?: string(name='ruleValue'),
weight?: int32(name='weight', example='90'),
}
](name='pointDeductionRuleList'),
points?: [
{
answerList?: [
{
answerValues?: [
{
answerName?: string(name='answerName'),
answerWeight?: int32(name='answerWeight'),
keywordValues?: [
{
name?: string(name='name'),
weight?: int32(name='weight'),
}
](name='keywordValues'),
keywordWeight?: int32(name='keywordWeight'),
scoringRules?: [
{
name?: string(name='name'),
}
](name='scoringRules'),
}
](name='answerValues'),
enabledKeyword?: boolean(name='enabledKeyword'),
name?: string(name='name'),
nameList?: [ string ](name='nameList'),
operators?: string(name='operators'),
parameters?: [
{
name?: string(name='name', example='name'),
value?: string(name='value', example='value'),
}
](name='parameters'),
type?: string(name='type', example='normalKnowledge'),
weight?: int32(name='weight', example='100'),
}
](name='answerList'),
knowledgeList?: [ string ](name='knowledgeList'),
name?: string(name='name', example='demo'),
pointId?: string(name='pointId'),
questionDescription?: string(name='questionDescription', example='test'),
sortNo?: int32(name='sortNo', example='1'),
weight?: int32(name='weight', example='50'),
}
](name='points'),
requestId?: string(name='requestId', example='1'),
sampleDialogueList?: [
{
message?: string(name='message'),
role?: string(name='role', example='coach'),
}
](name='sampleDialogueList'),
scoreConfig?: {
enabled?: boolean(name='enabled'),
passScore?: string(name='passScore'),
}(name='scoreConfig'),
scriptRecordId?: string(name='scriptRecordId', example='1'),
sparringTipContent?: string(name='sparringTipContent'),
sparringTipTitle?: string(name='sparringTipTitle'),
status?: int32(name='status', example='1'),
studentThinkTimeFlag?: boolean(name='studentThinkTimeFlag', example='true'),
studentThinkTimeLimit?: int32(name='studentThinkTimeLimit', example='100'),
type?: int32(name='type', example='1'),
weights?: {
abilityEvaluation?: int32(name='abilityEvaluation', example='10'),
abilityEvaluationEnabled?: boolean(name='abilityEvaluationEnabled', example='false'),
assessmentPoint?: int32(name='assessmentPoint', example='10'),
assessmentPointEnabled?: boolean(name='assessmentPointEnabled'),
expressiveness?: int32(name='expressiveness', example='10'),
expressivenessEnabled?: boolean(name='expressivenessEnabled', example='true'),
pointDeductionRule?: int32(name='pointDeductionRule', example='10'),
pointDeductionRuleEnabled?: boolean(name='pointDeductionRuleEnabled', example='true'),
standard?: int32(name='standard', example='10'),
standardEnabled?: boolean(name='standardEnabled', example='true'),
}(name='weights'),
}
model GetAICoachScriptResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAICoachScriptResponseBody(name='body'),
}
/**
* @summary 查询剧本详情
*
* @param request GetAICoachScriptRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetAICoachScriptResponse
*/
async function getAICoachScriptWithOptions(request: GetAICoachScriptRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAICoachScriptResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.scriptRecordId)) {
query['scriptRecordId'] = request.scriptRecordId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAICoachScript',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/getScript`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询剧本详情
*
* @param request GetAICoachScriptRequest
* @return GetAICoachScriptResponse
*/
async function getAICoachScript(request: GetAICoachScriptRequest): GetAICoachScriptResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getAICoachScriptWithOptions(request, headers, runtime);
}
model GetAICoachTaskSessionHistoryRequest {
pageNumber?: int32(name='pageNumber'),
pageSize?: int32(name='pageSize'),
sessionId?: string(name='sessionId', example='111'),
uid?: string(name='uid', example='1251317954812712'),
}
model GetAICoachTaskSessionHistoryResponseBody = {
conversationList?: [
{
audioUrl?: string(name='audioUrl'),
evaluationFeedback?: string(name='evaluationFeedback'),
evaluationResult?: string(name='evaluationResult', example='{}'),
message?: string(name='message'),
recordId?: string(name='recordId'),
role?: string(name='role'),
}
](name='conversationList'),
duration?: long(name='duration', example='0'),
endTime?: string(name='endTime', example='2024-11-08 09:33:21'),
pauseDuration?: long(name='pauseDuration'),
requestId?: string(name='requestId', example='D5798660-1531-5D12-9C20-16FEE9D22351'),
scriptName?: string(name='scriptName'),
startTime?: string(name='startTime', example='2024-08-21 05:00:01'),
status?: string(name='status'),
total?: int32(name='total'),
uid?: string(name='uid', example='1579404690269235'),
}
model GetAICoachTaskSessionHistoryResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAICoachTaskSessionHistoryResponseBody(name='body'),
}
/**
* @summary 学员查询会话历史
*
* @param request GetAICoachTaskSessionHistoryRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetAICoachTaskSessionHistoryResponse
*/
async function getAICoachTaskSessionHistoryWithOptions(request: GetAICoachTaskSessionHistoryRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAICoachTaskSessionHistoryResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.sessionId)) {
query['sessionId'] = request.sessionId;
}
if (!Util.isUnset(request.uid)) {
query['uid'] = request.uid;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAICoachTaskSessionHistory',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/querySessionHistory`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 学员查询会话历史
*
* @param request GetAICoachTaskSessionHistoryRequest
* @return GetAICoachTaskSessionHistoryResponse
*/
async function getAICoachTaskSessionHistory(request: GetAICoachTaskSessionHistoryRequest): GetAICoachTaskSessionHistoryResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getAICoachTaskSessionHistoryWithOptions(request, headers, runtime);
}
model GetAICoachTaskSessionReportRequest {
sessionId?: string(name='sessionId', example='1111'),
uid?: string(name='uid', example='1707732338016307'),
}
model GetAICoachTaskSessionReportResponseBody = {
duration?: long(name='duration', example='0'),
endTime?: string(name='endTime', example='2024-11-08 09:33:21'),
evaluationRating?: string(name='evaluationRating'),
evaluationResult?: string(name='evaluationResult', example='{}'),
feedback?: boolean(name='feedback'),
requestId?: string(name='requestId', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
scriptName?: string(name='scriptName'),
startTime?: string(name='startTime', example='2024-10-11 09:58:01'),
status?: string(name='status'),
uid?: string(name='uid', example='1276673855116835'),
}
model GetAICoachTaskSessionReportResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAICoachTaskSessionReportResponseBody(name='body'),
}
/**
* @summary 学员查询会话评测报告
*
* @param request GetAICoachTaskSessionReportRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetAICoachTaskSessionReportResponse
*/
async function getAICoachTaskSessionReportWithOptions(request: GetAICoachTaskSessionReportRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAICoachTaskSessionReportResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.sessionId)) {
query['sessionId'] = request.sessionId;
}
if (!Util.isUnset(request.uid)) {
query['uid'] = request.uid;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAICoachTaskSessionReport',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/queryTaskSessionReport`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 学员查询会话评测报告
*
* @param request GetAICoachTaskSessionReportRequest
* @return GetAICoachTaskSessionReportResponse
*/
async function getAICoachTaskSessionReport(request: GetAICoachTaskSessionReportRequest): GetAICoachTaskSessionReportResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getAICoachTaskSessionReportWithOptions(request, headers, runtime);
}
model GetIllustrationResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: IllustrationResult
}
/**
* @summary 查询配图
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetIllustrationResponse
*/
async function getIllustrationWithOptions(textId: string, illustrationId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetIllustrationResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'GetIllustration',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts/${OpenApiUtil.getEncodeParam(textId)}/illustrations/${OpenApiUtil.getEncodeParam(illustrationId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询配图
*
* @return GetIllustrationResponse
*/
async function getIllustration(textId: string, illustrationId: string): GetIllustrationResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getIllustrationWithOptions(textId, illustrationId, headers, runtime);
}
model GetIllustrationTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: IllustrationTaskResult
}
/**
* @summary 查询配图任务
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetIllustrationTaskResponse
*/
async function getIllustrationTaskWithOptions(textId: string, illustrationTaskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetIllustrationTaskResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'GetIllustrationTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts/${OpenApiUtil.getEncodeParam(textId)}/illustrationTasks/${OpenApiUtil.getEncodeParam(illustrationTaskId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询配图任务
*
* @return GetIllustrationTaskResponse
*/
async function getIllustrationTask(textId: string, illustrationTaskId: string): GetIllustrationTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getIllustrationTaskWithOptions(textId, illustrationTaskId, headers, runtime);
}
model GetOssUploadTokenRequest {
fileName?: string(name='fileName', description='This parameter is required.', example='8021678.png'),
fileType?: string(name='fileType', description='This parameter is required.', example='ProductImage'),
uploadType?: int32(name='uploadType'),
}
model GetOssUploadTokenResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetOssUploadTokenResult
}
/**
* @summary 获取图片上传oss token
*
* @param request GetOssUploadTokenRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetOssUploadTokenResponse
*/
async function getOssUploadTokenWithOptions(request: GetOssUploadTokenRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetOssUploadTokenResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.fileName)) {
query['fileName'] = request.fileName;
}
if (!Util.isUnset(request.fileType)) {
query['fileType'] = request.fileType;
}
if (!Util.isUnset(request.uploadType)) {
query['uploadType'] = request.uploadType;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetOssUploadToken',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/uploadToken`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取图片上传oss token
*
* @param request GetOssUploadTokenRequest
* @return GetOssUploadTokenResponse
*/
async function getOssUploadToken(request: GetOssUploadTokenRequest): GetOssUploadTokenResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getOssUploadTokenWithOptions(request, headers, runtime);
}
model GetProjectTaskRequest {
idempotentId?: string(name='IdempotentId', example='20230823218109326025-1200'),
taskId?: string(name='taskId', example='313123123'),
}
model GetProjectTaskResponseBody = {
errorMsg?: string(name='errorMsg', example='error'),
requestId?: string(name='requestId', example='5389BE87-571B-573C-90ED-F07C5E68760B'),
status?: string(name='status', example='SUCCESS'),
videoDownloadUrl?: string(name='videoDownloadUrl', example='www.ali.com'),
videoDuration?: int32(name='videoDuration', example='111'),
videoUrl?: string(name='videoUrl', example='www.ali.com'),
}
model GetProjectTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetProjectTaskResponseBody(name='body'),
}
/**
* @summary 获取数据人合成信息
*
* @param request GetProjectTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetProjectTaskResponse
*/
async function getProjectTaskWithOptions(request: GetProjectTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetProjectTaskResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.idempotentId)) {
query['IdempotentId'] = request.idempotentId;
}
if (!Util.isUnset(request.taskId)) {
query['taskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetProjectTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/project/getProjectTask`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取数据人合成信息
*
* @param request GetProjectTaskRequest
* @return GetProjectTaskResponse
*/
async function getProjectTask(request: GetProjectTaskRequest): GetProjectTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getProjectTaskWithOptions(request, headers, runtime);
}
model GetTextResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TextResult
}
/**
* @summary 查询文案
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetTextResponse
*/
async function getTextWithOptions(textId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetTextResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'GetText',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts/${OpenApiUtil.getEncodeParam(textId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询文案
*
* @return GetTextResponse
*/
async function getText(textId: string): GetTextResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getTextWithOptions(textId, headers, runtime);
}
model GetTextTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TextTaskResult
}
/**
* @summary 查询文案任务
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetTextTaskResponse
*/
async function getTextTaskWithOptions(textTaskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetTextTaskResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'GetTextTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/textTasks/${OpenApiUtil.getEncodeParam(textTaskId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询文案任务
*
* @return GetTextTaskResponse
*/
async function getTextTask(textTaskId: string): GetTextTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getTextTaskWithOptions(textTaskId, headers, runtime);
}
model GetTextTemplateRequest {
industry?: string(name='industry', example='Car'),
}
model GetTextTemplateResponseBody = {
availableIndustry?: {
name?: string(name='name', example='Car'),
textModeTypes?: [
{
name?: string(name='name', example='Rewrite'),
textStyles?: [
{
desc?: string(name='desc'),
disabled?: boolean(name='disabled', example='false'),
name?: string(name='name', example='RED_BOOK'),
templateKey?: string(name='templateKey', example='111'),
}
](name='textStyles'),
}
](name='textModeTypes'),
}(name='availableIndustry'),
requestId?: string(name='requestId', example='3239281273464326823'),
}
model GetTextTemplateResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetTextTemplateResponseBody(name='body'),
}
/**
* @summary 查询表单配置
*
* @param request GetTextTemplateRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return GetTextTemplateResponse
*/
async function getTextTemplateWithOptions(request: GetTextTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetTextTemplateResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.industry)) {
query['industry'] = request.industry;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetTextTemplate',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts/commands/getTextTemplate`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询表单配置
*
* @param request GetTextTemplateRequest
* @return GetTextTemplateResponse
*/
async function getTextTemplate(request: GetTextTemplateRequest): GetTextTemplateResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return getTextTemplateWithOptions(request, headers, runtime);
}
model InteractTextRequest {
agentId?: string(name='agentId', example='1000222'),
content?: string(name='content'),
sessionId?: string(name='sessionId', example='144285195534941'),
}
model InteractTextResponseBody = {
end?: boolean(name='end', example='false'),
index?: int32(name='index', example='1'),
message?: string(name='message'),
relatedImages?: [ string ](name='relatedImages'),
relatedVideos?: [ string ](name='relatedVideos'),
sessionId?: string(name='sessionId', example='79e954faffe2415ebd18188ba787d78e'),
type?: int32(name='type', example='2'),
}
model InteractTextResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: InteractTextResponseBody(name='body'),
}
/**
* @summary 营销文案互动问答
*
* @param request InteractTextRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return InteractTextResponse
*/
async function interactTextWithOptions(request: InteractTextRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InteractTextResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.agentId)) {
body['agentId'] = request.agentId;
}
if (!Util.isUnset(request.content)) {
body['content'] = request.content;
}
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'InteractText',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/stream/interactText`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 营销文案互动问答
*
* @param request InteractTextRequest
* @return InteractTextResponse
*/
async function interactText(request: InteractTextRequest): InteractTextResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return interactTextWithOptions(request, headers, runtime);
}
model ListAICoachScriptPageRequest {
name?: string(name='name'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
status?: int32(name='status', example='1'),
type?: int32(name='type'),
}
model ListAICoachScriptPageResponseBody = {
errorCode?: string(name='errorCode', example='PARAM_ERROR'),
errorMessage?: string(name='errorMessage', example='SYSTEM_ERROR'),
list?: [
{
appendQuestionFlag?: string(name='appendQuestionFlag'),
assessmentScope?: string(name='assessmentScope'),
closingRemarks?: string(name='closingRemarks'),
completeStrategy?: {
clickCompleteAutoEnd?: boolean(name='clickCompleteAutoEnd', example='true'),
duration?: int32(name='duration', example='75'),
fullCoverageAutoEnd?: boolean(name='fullCoverageAutoEnd', example='false'),
}(name='completeStrategy'),
coverUrl?: string(name='coverUrl', example='https://oss-ata.alibaba.com/front/live/banner1.png'),
dialogueTextFlag?: boolean(name='dialogueTextFlag'),
dialogueTipFlag?: boolean(name='dialogueTipFlag'),
evaluateReportFlag?: boolean(name='evaluateReportFlag'),
expressiveness?: map[string]string(name='expressiveness'),
gifDynamicUrl?: string(name='gifDynamicUrl'),
gifStaticUrl?: string(name='gifStaticUrl'),
gmtCreate?: string(name='gmtCreate', example='2024-12-25 14:00:00'),
gmtModified?: string(name='gmtModified', example='2024-12-25 14:00:00'),
initiator?: string(name='initiator', example='student'),
interactionType?: string(name='interactionType', example='4'),
introduce?: string(name='introduce'),
name?: string(name='name', example='prod-ydsf'),
openingRemarks?: string(name='openingRemarks'),
orderAckFlag?: boolean(name='orderAckFlag'),
sampleDialogueList?: [
{
message?: string(name='message'),
role?: string(name='role', example='student'),
}
](name='sampleDialogueList'),
scoreConfig?: {
enabled?: boolean(name='enabled'),
passScore?: int32(name='passScore'),
}(name='scoreConfig'),
scriptRecordId?: string(name='scriptRecordId', example='1'),
sparringTipContent?: string(name='sparringTipContent'),
sparringTipTitle?: string(name='sparringTipTitle'),
status?: int32(name='status', example='1'),
studentThinkTimeFlag?: boolean(name='studentThinkTimeFlag'),
type?: int32(name='type'),
weights?: {
assessmentPoint?: int32(name='assessmentPoint', example='50'),
assessmentPointEnabled?: boolean(name='assessmentPointEnabled'),
expressiveness?: int32(name='expressiveness', example='30'),
expressivenessEnabled?: boolean(name='expressivenessEnabled'),
pointDeductionRule?: int32(name='pointDeductionRule'),
pointDeductionRuleEnabled?: boolean(name='pointDeductionRuleEnabled'),
standard?: int32(name='standard', example='20'),
standardEnabled?: boolean(name='standardEnabled', example='true'),
}(name='weights'),
}
](name='list'),
requestId?: string(name='requestId', description='Id of the request', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
success?: boolean(name='success', example='true'),
total?: int32(name='total', example='10'),
}
model ListAICoachScriptPageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAICoachScriptPageResponseBody(name='body'),
}
/**
* @summary 查询剧本列表
*
* @param request ListAICoachScriptPageRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListAICoachScriptPageResponse
*/
async function listAICoachScriptPageWithOptions(request: ListAICoachScriptPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAICoachScriptPageResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.name)) {
query['name'] = request.name;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.status)) {
query['status'] = request.status;
}
if (!Util.isUnset(request.type)) {
query['type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAICoachScriptPage',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/pageScript`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询剧本列表
*
* @param request ListAICoachScriptPageRequest
* @return ListAICoachScriptPageResponse
*/
async function listAICoachScriptPage(request: ListAICoachScriptPageRequest): ListAICoachScriptPageResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listAICoachScriptPageWithOptions(request, headers, runtime);
}
model ListAICoachTaskPageRequest {
endTime?: string(name='endTime'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
startTime?: string(name='startTime'),
status?: string(name='status', example='FINISHED'),
studentId?: string(name='studentId', example='111'),
taskId?: string(name='taskId', example='313123123'),
}
model ListAICoachTaskPageResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='D7F2B74F-63F2-5DD6-95E4-F408EAD6617E'),
taskList?: [
{
finishTime?: string(name='finishTime', example='yyyy-MM-dd HH:mm:ss'),
gmtCreate?: string(name='gmtCreate'),
status?: string(name='status', example='FINISHED'),
studentId?: string(name='studentId', example='222'),
taskId?: string(name='taskId', example='11111111111'),
}
](name='taskList'),
}
model ListAICoachTaskPageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAICoachTaskPageResponseBody(name='body'),
}
/**
* @summary 查询任务列表
*
* @param request ListAICoachTaskPageRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListAICoachTaskPageResponse
*/
async function listAICoachTaskPageWithOptions(request: ListAICoachTaskPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAICoachTaskPageResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.endTime)) {
query['endTime'] = request.endTime;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.startTime)) {
query['startTime'] = request.startTime;
}
if (!Util.isUnset(request.status)) {
query['status'] = request.status;
}
if (!Util.isUnset(request.studentId)) {
query['studentId'] = request.studentId;
}
if (!Util.isUnset(request.taskId)) {
query['taskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAICoachTaskPage',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/aicoach/listTaskPage`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询任务列表
*
* @param request ListAICoachTaskPageRequest
* @return ListAICoachTaskPageResponse
*/
async function listAICoachTaskPage(request: ListAICoachTaskPageRequest): ListAICoachTaskPageResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listAICoachTaskPageWithOptions(request, headers, runtime);
}
model ListAgentsRequest {
agentId?: string(name='agentId', example='840016700254633984'),
agentScene?: string(name='agentScene', example='text'),
owner?: string(name='owner', example='SYSTEM'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
status?: int32(name='status', example='0'),
}
model ListAgentsResponseBody = {
list?: [
{
agentId?: string(name='agentId', example='840016700254633984'),
agentName?: string(name='agentName'),
agentScene?: string(name='agentScene', example='text'),
charactersDescription?: string(name='charactersDescription'),
enableInteraction?: int32(name='enableInteraction', example='1'),
industry?: string(name='industry', example='Car'),
onlineSearch?: boolean(name='onlineSearch', example='true'),
owner?: string(name='owner', example='SYSTEM'),
referenceUrl?: string(name='referenceUrl', example='http
;//www.abc.com/111.mp4'),
status?: int32(name='status', example='0'),
textStyle?: string(name='textStyle', example='RED_BOOK'),
viewer?: string(name='viewer', example='Seller'),
}
](name='list'),
requestId?: string(name='requestId', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
success?: boolean(name='success', example='true'),
total?: int32(name='total', example='10'),
}
model ListAgentsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAgentsResponseBody(name='body'),
}
/**
* @summary 分页查询智能体
*
* @param request ListAgentsRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListAgentsResponse
*/
async function listAgentsWithOptions(request: ListAgentsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAgentsResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.agentId)) {
query['agentId'] = request.agentId;
}
if (!Util.isUnset(request.agentScene)) {
query['agentScene'] = request.agentScene;
}
if (!Util.isUnset(request.owner)) {
query['owner'] = request.owner;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.status)) {
query['status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAgents',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/agent/listAgents`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 分页查询智能体
*
* @param request ListAgentsRequest
* @return ListAgentsResponse
*/
async function listAgents(request: ListAgentsRequest): ListAgentsResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listAgentsWithOptions(request, headers, runtime);
}
model ListAnchorRequest {
anchorCategory?: string(name='anchorCategory'),
anchorId?: string(name='anchorId'),
anchorType?: string(name='anchorType', example='PUBLIC_MODEL'),
coverRate?: string(name='coverRate', example='9:16'),
digitalHumanType?: string(name='digitalHumanType', example='staticTransparency'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
resSpecType?: string(name='resSpecType'),
useScene?: string(name='useScene', example='offlineSynthesis'),
}
model ListAnchorResponseBody = {
code?: string(name='code', description='code', example='200'),
errorCode?: string(name='errorCode', example='Deduct.DeductTaskAlreadySuccess'),
errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
list?: [
AnchorResponse
](name='list'),
requestId?: string(name='requestId', description='requestId', example='5389BE87-571B-573C-90ED-F07C5E68760B'),
success?: boolean(name='success', example='True'),
total?: int32(name='total', example='10'),
}
model ListAnchorResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAnchorResponseBody(name='body'),
}
/**
* @summary 获取数字人模特列表
*
* @param request ListAnchorRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListAnchorResponse
*/
async function listAnchorWithOptions(request: ListAnchorRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAnchorResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.anchorCategory)) {
query['anchorCategory'] = request.anchorCategory;
}
if (!Util.isUnset(request.anchorId)) {
query['anchorId'] = request.anchorId;
}
if (!Util.isUnset(request.anchorType)) {
query['anchorType'] = request.anchorType;
}
if (!Util.isUnset(request.coverRate)) {
query['coverRate'] = request.coverRate;
}
if (!Util.isUnset(request.digitalHumanType)) {
query['digitalHumanType'] = request.digitalHumanType;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.resSpecType)) {
query['resSpecType'] = request.resSpecType;
}
if (!Util.isUnset(request.useScene)) {
query['useScene'] = request.useScene;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAnchor',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/anchorOpen/listAnchor`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取数字人模特列表
*
* @param request ListAnchorRequest
* @return ListAnchorResponse
*/
async function listAnchor(request: ListAnchorRequest): ListAnchorResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listAnchorWithOptions(request, headers, runtime);
}
model ListAvatarProjectRequest {
projectIdList?: [ string ](name='projectIdList'),
}
model ListAvatarProjectShrinkRequest {
projectIdListShrink?: string(name='projectIdList'),
}
model ListAvatarProjectResponseBody = {
queryAvatarProjectResultList?: [
{
agentId?: string(name='agentId', example='1000206'),
errorMsg?: string(name='errorMsg'),
projectId?: string(name='projectId', example='12826084562688'),
projectName?: string(name='projectName'),
status?: string(name='status', example='DEPLOYING'),
}
](name='queryAvatarProjectResultList'),
requestId?: string(name='requestId', example='D7F2B74F-63F2-5DD6-95E4-F408EAD6617E'),
}
model ListAvatarProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListAvatarProjectResponseBody(name='body'),
}
/**
* @summary 批量查询数字人项目启动结果
*
* @param tmpReq ListAvatarProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListAvatarProjectResponse
*/
async function listAvatarProjectWithOptions(tmpReq: ListAvatarProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAvatarProjectResponse {
Util.validateModel(tmpReq);
var request = new ListAvatarProjectShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.projectIdList)) {
request.projectIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.projectIdList, 'projectIdList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.projectIdListShrink)) {
query['projectIdList'] = request.projectIdListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAvatarProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/listAvatarProject`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 批量查询数字人项目启动结果
*
* @param request ListAvatarProjectRequest
* @return ListAvatarProjectResponse
*/
async function listAvatarProject(request: ListAvatarProjectRequest): ListAvatarProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listAvatarProjectWithOptions(request, headers, runtime);
}
model ListKnowledgeBaseRequest {
knowledgeBaseId?: string(name='knowledgeBaseId', example='"186432649"'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
}
model ListKnowledgeBaseResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: KnowledgeBaseListResult
}
/**
* @summary 查询知识库
*
* @param request ListKnowledgeBaseRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListKnowledgeBaseResponse
*/
async function listKnowledgeBaseWithOptions(request: ListKnowledgeBaseRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListKnowledgeBaseResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.knowledgeBaseId)) {
query['knowledgeBaseId'] = request.knowledgeBaseId;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListKnowledgeBase',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/knowledge-base`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询知识库
*
* @param request ListKnowledgeBaseRequest
* @return ListKnowledgeBaseResponse
*/
async function listKnowledgeBase(request: ListKnowledgeBaseRequest): ListKnowledgeBaseResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listKnowledgeBaseWithOptions(request, headers, runtime);
}
model ListTextThemesRequest {
industry?: string(name='industry'),
}
model ListTextThemesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TextThemeListResult
}
/**
* @summary 查询文案主题列表
*
* @param request ListTextThemesRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListTextThemesResponse
*/
async function listTextThemesWithOptions(request: ListTextThemesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListTextThemesResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.industry)) {
query['industry'] = request.industry;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTextThemes',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/textThemes`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询文案主题列表
*
* @param request ListTextThemesRequest
* @return ListTextThemesResponse
*/
async function listTextThemes(request: ListTextThemesRequest): ListTextThemesResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listTextThemesWithOptions(request, headers, runtime);
}
model ListTextsRequest {
generationSource?: string(name='generationSource', example='API'),
industry?: string(name='industry', example='Common'),
keyword?: string(name='keyword'),
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
publishStatus?: string(name='publishStatus', example='PUBLISH'),
textStyleType?: string(name='textStyleType', example='WECHAT_MOMENT'),
textTheme?: string(name='textTheme', example='xxx'),
}
model ListTextsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TextQueryResult
}
/**
* @summary 列举文案
*
* @param request ListTextsRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListTextsResponse
*/
async function listTextsWithOptions(request: ListTextsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListTextsResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.generationSource)) {
query['generationSource'] = request.generationSource;
}
if (!Util.isUnset(request.industry)) {
query['industry'] = request.industry;
}
if (!Util.isUnset(request.keyword)) {
query['keyword'] = request.keyword;
}
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.publishStatus)) {
query['publishStatus'] = request.publishStatus;
}
if (!Util.isUnset(request.textStyleType)) {
query['textStyleType'] = request.textStyleType;
}
if (!Util.isUnset(request.textTheme)) {
query['textTheme'] = request.textTheme;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTexts',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/texts`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 列举文案
*
* @param request ListTextsRequest
* @return ListTextsResponse
*/
async function listTexts(request: ListTextsRequest): ListTextsResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listTextsWithOptions(request, headers, runtime);
}
model ListVoiceModelsRequest {
pageNumber?: int32(name='pageNumber', example='1'),
pageSize?: int32(name='pageSize', example='10'),
resSpecType?: string(name='resSpecType'),
useScene?: string(name='useScene', example='offlineSynthesis'),
voiceLanguage?: string(name='voiceLanguage'),
voiceType?: string(name='voiceType', example='PRIVATE_VOICE'),
}
model ListVoiceModelsResponseBody = {
code?: string(name='code', example='200'),
errorCode?: string(name='errorCode', example='040002'),
errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
list?: [
VoiceModelResponse
](name='list'),
requestId?: string(name='requestId', description='Id of the request', example='14878724-A835-578D-9DD5-4779ADCE9221'),
success?: boolean(name='success', example='True'),
total?: int32(name='total', example='10'),
}
model ListVoiceModelsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListVoiceModelsResponseBody(name='body'),
}
/**
* @summary 获取声音模版列表
*
* @param request ListVoiceModelsRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return ListVoiceModelsResponse
*/
async function listVoiceModelsWithOptions(request: ListVoiceModelsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListVoiceModelsResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.pageNumber)) {
query['pageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.resSpecType)) {
query['resSpecType'] = request.resSpecType;
}
if (!Util.isUnset(request.useScene)) {
query['useScene'] = request.useScene;
}
if (!Util.isUnset(request.voiceLanguage)) {
query['voiceLanguage'] = request.voiceLanguage;
}
if (!Util.isUnset(request.voiceType)) {
query['voiceType'] = request.voiceType;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListVoiceModels',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/voiceOpen/listVoiceModels`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 获取声音模版列表
*
* @param request ListVoiceModelsRequest
* @return ListVoiceModelsResponse
*/
async function listVoiceModels(request: ListVoiceModelsRequest): ListVoiceModelsResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return listVoiceModelsWithOptions(request, headers, runtime);
}
model OperateAvatarProjectRequest {
operateType?: string(name='operateType', example='DELETE'),
projectId?: string(name='projectId', example='812907463682949120'),
resChannelNumber?: int32(name='resChannelNumber', example='1'),
resType?: string(name='resType', example='FREE'),
}
model OperateAvatarProjectResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
success?: boolean(name='success', example='True'),
}
model OperateAvatarProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: OperateAvatarProjectResponseBody(name='body'),
}
/**
* @summary 操作实时数字人项目
*
* @param request OperateAvatarProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return OperateAvatarProjectResponse
*/
async function operateAvatarProjectWithOptions(request: OperateAvatarProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): OperateAvatarProjectResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.operateType)) {
body['operateType'] = request.operateType;
}
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.resChannelNumber)) {
body['resChannelNumber'] = request.resChannelNumber;
}
if (!Util.isUnset(request.resType)) {
body['resType'] = request.resType;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'OperateAvatarProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/operateProjectAvatar`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 操作实时数字人项目
*
* @param request OperateAvatarProjectRequest
* @return OperateAvatarProjectResponse
*/
async function operateAvatarProject(request: OperateAvatarProjectRequest): OperateAvatarProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return operateAvatarProjectWithOptions(request, headers, runtime);
}
model QueryAvatarProjectRequest {
projectId?: string(name='projectId', example='11111'),
}
model QueryAvatarProjectResponseBody = {
agentId?: string(name='agentId', example='1000222'),
errorMsg?: string(name='errorMsg', example='error'),
frames?: [
{
index?: int32(name='index'),
layers?: [
{
height?: int32(name='height'),
index?: int32(name='index'),
material?: {
format?: string(name='format'),
id?: string(name='id'),
url?: string(name='url'),
}(name='material'),
positionX?: int32(name='positionX'),
positionY?: int32(name='positionY'),
type?: string(name='type'),
width?: int32(name='width'),
}
](name='layers'),
videoScript?: {
emotion?: string(name='emotion'),
pitchRate?: string(name='pitchRate'),
speedRate?: string(name='speedRate'),
textContent?: string(name='textContent'),
voiceLanguage?: string(name='voiceLanguage'),
voiceTemplateId?: string(name='voiceTemplateId'),
volume?: int32(name='volume'),
}(name='videoScript'),
}
](name='frames'),
projectName?: string(name='projectName', example='doc_test_3'),
requestId?: string(name='requestId', example='2C331582-7390-5949-8D9A-AC8239185B37'),
resSpecType?: string(name='resSpecType'),
scaleType?: string(name='scaleType'),
scriptModelTag?: string(name='scriptModelTag'),
status?: string(name='status', example='DEPLOYING'),
}
model QueryAvatarProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryAvatarProjectResponseBody(name='body'),
}
/**
* @summary 查询数字人项目信息
*
* @param request QueryAvatarProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QueryAvatarProjectResponse
*/
async function queryAvatarProjectWithOptions(request: QueryAvatarProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryAvatarProjectResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.projectId)) {
query['projectId'] = request.projectId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QueryAvatarProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/queryAvatarProject`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询数字人项目信息
*
* @param request QueryAvatarProjectRequest
* @return QueryAvatarProjectResponse
*/
async function queryAvatarProject(request: QueryAvatarProjectRequest): QueryAvatarProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return queryAvatarProjectWithOptions(request, headers, runtime);
}
model QueryAvatarResourceRequest {
idempotentId?: string(name='idempotentId', example='11111'),
}
model QueryAvatarResourceResponseBody = {
queryResourceInfoList?: [
{
resourceId?: string(name='resourceId', example='21275'),
type?: string(name='type', example='STANDARD'),
validPeriodTime?: string(name='validPeriodTime', example='1719904342237'),
}
](name='queryResourceInfoList'),
requestId?: string(name='requestId', example='D5798660-1531-5D12-9C20-16FEE9D22351'),
}
model QueryAvatarResourceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryAvatarResourceResponseBody(name='body'),
}
/**
* @summary 查找资源
*
* @param request QueryAvatarResourceRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QueryAvatarResourceResponse
*/
async function queryAvatarResourceWithOptions(request: QueryAvatarResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryAvatarResourceResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.idempotentId)) {
query['idempotentId'] = request.idempotentId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QueryAvatarResource',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/queryResource`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查找资源
*
* @param request QueryAvatarResourceRequest
* @return QueryAvatarResourceResponse
*/
async function queryAvatarResource(request: QueryAvatarResourceRequest): QueryAvatarResourceResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return queryAvatarResourceWithOptions(request, headers, runtime);
}
model QueryImageToVideoTaskRequest {
taskId?: string(name='taskId', example='868125994191405056'),
}
model QueryImageToVideoTaskResponseBody = {
message?: string(name='message', example='None'),
originUrl?: string(name='originUrl', example='https://xxx/xxx.mp4'),
requestId?: string(name='requestId', example='CC2967CA-0114-57E0-A0CF-7DEEEDAB953D'),
status?: int32(name='status', example='1'),
success?: boolean(name='success', example='True'),
taskId?: string(name='taskId', example='868125994191405056'),
}
model QueryImageToVideoTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryImageToVideoTaskResponseBody(name='body'),
}
/**
* @summary 查询图片转视频任务
*
* @param request QueryImageToVideoTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QueryImageToVideoTaskResponse
*/
async function queryImageToVideoTaskWithOptions(request: QueryImageToVideoTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryImageToVideoTaskResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.taskId)) {
query['taskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QueryImageToVideoTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/video/imageToVideo/task`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询图片转视频任务
*
* @param request QueryImageToVideoTaskRequest
* @return QueryImageToVideoTaskResponse
*/
async function queryImageToVideoTask(request: QueryImageToVideoTaskRequest): QueryImageToVideoTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return queryImageToVideoTaskWithOptions(request, headers, runtime);
}
model QueryIndividuationTextTaskRequest {
taskId?: string(name='taskId', example='829682927337963520'),
}
model QueryIndividuationTextTaskResponseBody = {
createTime?: string(name='createTime', example='yyyy-MM-dd HH:mm:ss'),
requestId?: string(name='requestId', description='Id of the request', example='56AC346B-AF40-5E4F-AFFE-FD8BA5E6FB3A'),
status?: int32(name='status', example='0'),
textList?: [
{
status?: int32(name='status', example='0'),
textId?: string(name='textId', example='2761'),
userId?: string(name='userId', example='11'),
}
](name='textList'),
updateTime?: string(name='updateTime', example='yyyy-MM-dd HH:mm:ss'),
}
model QueryIndividuationTextTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryIndividuationTextTaskResponseBody(name='body'),
}
/**
* @summary 查询个性化文案任务
*
* @param request QueryIndividuationTextTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QueryIndividuationTextTaskResponse
*/
async function queryIndividuationTextTaskWithOptions(request: QueryIndividuationTextTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryIndividuationTextTaskResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.taskId)) {
query['taskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QueryIndividuationTextTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/individuationText/queryTextTask`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询个性化文案任务
*
* @param request QueryIndividuationTextTaskRequest
* @return QueryIndividuationTextTaskResponse
*/
async function queryIndividuationTextTask(request: QueryIndividuationTextTaskRequest): QueryIndividuationTextTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return queryIndividuationTextTaskWithOptions(request, headers, runtime);
}
model QuerySessionInfoRequest {
pageNo?: int32(name='pageNo', example='1'),
pageSize?: int32(name='pageSize', example='10'),
projectId?: string(name='projectId', example='805800890535673856'),
statusList?: [ string ](name='statusList'),
}
model QuerySessionInfoShrinkRequest {
pageNo?: int32(name='pageNo', example='1'),
pageSize?: int32(name='pageSize', example='10'),
projectId?: string(name='projectId', example='805800890535673856'),
statusListShrink?: string(name='statusList'),
}
model QuerySessionInfoResponseBody = {
queryResourceInfoList?: [
{
sessionId?: string(name='sessionId', example='a169e9ec18404edc9972afd80866dc97'),
status?: string(name='status', example='FREE'),
}
](name='queryResourceInfoList'),
requestId?: string(name='requestId', example='4D902811-B75C-5D1B-8882-D515F8E2F977'),
total?: long(name='total', example='26'),
}
model QuerySessionInfoResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QuerySessionInfoResponseBody(name='body'),
}
/**
* @summary 查询会话信息
*
* @param tmpReq QuerySessionInfoRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QuerySessionInfoResponse
*/
async function querySessionInfoWithOptions(tmpReq: QuerySessionInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QuerySessionInfoResponse {
Util.validateModel(tmpReq);
var request = new QuerySessionInfoShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.statusList)) {
request.statusListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.statusList, 'statusList', 'simple');
}
var query : map[string]any = {};
if (!Util.isUnset(request.pageNo)) {
query['pageNo'] = request.pageNo;
}
if (!Util.isUnset(request.pageSize)) {
query['pageSize'] = request.pageSize;
}
if (!Util.isUnset(request.projectId)) {
query['projectId'] = request.projectId;
}
if (!Util.isUnset(request.statusListShrink)) {
query['statusList'] = request.statusListShrink;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'QuerySessionInfo',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/querySessionInfo`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询会话信息
*
* @param request QuerySessionInfoRequest
* @return QuerySessionInfoResponse
*/
async function querySessionInfo(request: QuerySessionInfoRequest): QuerySessionInfoResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return querySessionInfoWithOptions(request, headers, runtime);
}
model QueryTextStreamResponseBody = {
end?: boolean(name='end', example='false'),
index?: int32(name='index', example='1'),
message?: string(name='message', description='Id of the request', example='None'),
type?: int32(name='type', example='1'),
}
model QueryTextStreamResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryTextStreamResponseBody(name='body'),
}
/**
* @summary 流式输出文案
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return QueryTextStreamResponse
*/
async function queryTextStreamWithOptions(textId: string, headers: map[string]string, runtime: Util.RuntimeOptions): QueryTextStreamResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'QueryTextStream',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/stream/queryTextStream/${OpenApiUtil.getEncodeParam(textId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 流式输出文案
*
* @return QueryTextStreamResponse
*/
async function queryTextStream(textId: string): QueryTextStreamResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return queryTextStreamWithOptions(textId, headers, runtime);
}
model SaveAvatarProjectRequest {
agentId?: string(name='agentId', example='1000196'),
bitRate?: string(name='bitRate'),
frameRate?: string(name='frameRate'),
frames?: [
{
index?: int32(name='index'),
layers?: [
{
height?: int32(name='height', example='100'),
index?: int32(name='index'),
material?: {
format?: string(name='format', example='image/png'),
id?: string(name='id', example='434508'),
url?: string(name='url', example='https://alidocs.dingtalk.com/i/nodes/vy20BglGWOxjGpq0C5G4DlN0VA7depqY'),
}(name='material'),
positionX?: int32(name='positionX', example='1'),
positionY?: int32(name='positionY', example='1'),
type?: string(name='type', example='ANCHOR'),
width?: int32(name='width', example='100'),
}
](name='layers'),
videoScript?: {
emotion?: string(name='emotion'),
pitchRate?: string(name='pitchRate'),
speedRate?: string(name='speedRate', example='1.0'),
textContent?: string(name='textContent'),
voiceLanguage?: string(name='voiceLanguage'),
voiceTemplateId?: string(name='voiceTemplateId', example='1'),
volume?: string(name='volume', example='50'),
}(name='videoScript'),
}
](name='frames'),
operateType?: string(name='operateType', example='CREATE'),
projectId?: string(name='projectId', example='787594567117586432'),
projectName?: string(name='projectName', example='df_cs_471437'),
resSpecType?: string(name='resSpecType', example='STANDARD'),
resolution?: string(name='resolution'),
scaleType?: string(name='scaleType', example='9:16'),
scriptModelTag?: string(name='scriptModelTag'),
synchronizedDisplay?: string(name='synchronizedDisplay'),
}
model SaveAvatarProjectResponseBody = {
agentId?: string(name='agentId', example='1000222'),
errorCode?: string(name='errorCode', example='040002'),
errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
errorMsg?: string(name='errorMsg', example='error'),
projectId?: string(name='projectId', example='812907463682949120'),
projectName?: string(name='projectName', example='doc_test_3'),
requestId?: string(name='requestId', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
status?: string(name='status', example='DRAFT'),
}
model SaveAvatarProjectResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SaveAvatarProjectResponseBody(name='body'),
}
/**
* @summary 保存实时数字人项目
*
* @param request SaveAvatarProjectRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SaveAvatarProjectResponse
*/
async function saveAvatarProjectWithOptions(request: SaveAvatarProjectRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SaveAvatarProjectResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.agentId)) {
body['agentId'] = request.agentId;
}
if (!Util.isUnset(request.bitRate)) {
body['bitRate'] = request.bitRate;
}
if (!Util.isUnset(request.frameRate)) {
body['frameRate'] = request.frameRate;
}
if (!Util.isUnset(request.frames)) {
body['frames'] = request.frames;
}
if (!Util.isUnset(request.operateType)) {
body['operateType'] = request.operateType;
}
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.projectName)) {
body['projectName'] = request.projectName;
}
if (!Util.isUnset(request.resSpecType)) {
body['resSpecType'] = request.resSpecType;
}
if (!Util.isUnset(request.resolution)) {
body['resolution'] = request.resolution;
}
if (!Util.isUnset(request.scaleType)) {
body['scaleType'] = request.scaleType;
}
if (!Util.isUnset(request.scriptModelTag)) {
body['scriptModelTag'] = request.scriptModelTag;
}
if (!Util.isUnset(request.synchronizedDisplay)) {
body['synchronizedDisplay'] = request.synchronizedDisplay;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SaveAvatarProject',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/saveAvatarProject`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 保存实时数字人项目
*
* @param request SaveAvatarProjectRequest
* @return SaveAvatarProjectResponse
*/
async function saveAvatarProject(request: SaveAvatarProjectRequest): SaveAvatarProjectResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return saveAvatarProjectWithOptions(request, headers, runtime);
}
model SelectImageTaskResponseBody = {
errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
failed?: string(name='failed', example='1'),
generationSource?: string(name='generationSource', example='PLATFORM'),
gmtCreate?: string(name='gmtCreate', example='1'),
imageInfos?: [
{
customImageUrl?: string(name='customImageUrl', example='www.ali.com'),
gmtCreate?: string(name='gmtCreate', example='1'),
imageH?: string(name='imageH', example='500'),
imageW?: string(name='imageW', example='500'),
}
](name='imageInfos'),
requestId?: string(name='requestId', description='Id of the request', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
scene?: string(name='scene', example='1'),
status?: string(name='status', example='Successed'),
subtaskProcessing?: string(name='subtaskProcessing', example='1'),
success?: string(name='success', example='1'),
total?: string(name='total', example='10'),
}
model SelectImageTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SelectImageTaskResponseBody(name='body'),
}
/**
* @summary 查询图片任务
*
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SelectImageTaskResponse
*/
async function selectImageTaskWithOptions(taskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): SelectImageTaskResponse {
var req = new OpenApi.OpenApiRequest{
headers = headers,
};
var params = new OpenApi.Params{
action = 'SelectImageTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/images/portrait/select/${OpenApiUtil.getEncodeParam(taskId)}`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询图片任务
*
* @return SelectImageTaskResponse
*/
async function selectImageTask(taskId: string): SelectImageTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return selectImageTaskWithOptions(taskId, headers, runtime);
}
model SelectResourceRequest {
idempotentId?: string(name='idempotentId', example='1111'),
}
model SelectResourceResponseBody = {
aliyunUid?: string(name='aliyunUid'),
requestId?: string(name='requestId', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
resourceInfoList?: [
{
expireTime?: string(name='expireTime', example='111'),
lastExpire?: int32(name='lastExpire', example='11'),
remainCount?: int32(name='remainCount', example='1249'),
resourceType?: int32(name='resourceType', example='2'),
unit?: string(name='unit', example='second'),
}
](name='resourceInfoList'),
}
model SelectResourceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SelectResourceResponseBody(name='body'),
}
/**
* @summary 查询离线数字人剩余资源
*
* @param request SelectResourceRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SelectResourceResponse
*/
async function selectResourceWithOptions(request: SelectResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SelectResourceResponse {
Util.validateModel(request);
var query : map[string]any = {};
if (!Util.isUnset(request.idempotentId)) {
query['idempotentId'] = request.idempotentId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'SelectResource',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/project/commands/overview`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询离线数字人剩余资源
*
* @param request SelectResourceRequest
* @return SelectResourceResponse
*/
async function selectResource(request: SelectResourceRequest): SelectResourceResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return selectResourceWithOptions(request, headers, runtime);
}
model SendSdkMessageRequest {
data?: string(name='data', example='{}'),
header?: string(name='header'),
moduleName?: string(name='moduleName', example='avatar'),
operationName?: string(name='operationName', example='getProject'),
userId?: string(name='userId', example='123'),
}
model SendSdkMessageResponseBody = {
data?: string(name='data', example='{}'),
errorCode?: string(name='errorCode', example='system-01'),
errorMessage?: string(name='errorMessage', example='SYSTEM_ERROR'),
requestId?: string(name='requestId', description='Id of the request', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
success?: boolean(name='success', description='true', example='true'),
}
model SendSdkMessageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SendSdkMessageResponseBody(name='body'),
}
/**
* @summary 发送sdk消息
*
* @param request SendSdkMessageRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SendSdkMessageResponse
*/
async function sendSdkMessageWithOptions(request: SendSdkMessageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SendSdkMessageResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.data)) {
body['data'] = request.data;
}
if (!Util.isUnset(request.header)) {
body['header'] = request.header;
}
if (!Util.isUnset(request.moduleName)) {
body['moduleName'] = request.moduleName;
}
if (!Util.isUnset(request.operationName)) {
body['operationName'] = request.operationName;
}
if (!Util.isUnset(request.userId)) {
body['userId'] = request.userId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SendSdkMessage',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/sdk/sendMessage`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 发送sdk消息
*
* @param request SendSdkMessageRequest
* @return SendSdkMessageResponse
*/
async function sendSdkMessage(request: SendSdkMessageRequest): SendSdkMessageResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return sendSdkMessageWithOptions(request, headers, runtime);
}
model SendSdkStreamMessageRequest {
data?: string(name='data', example='{"test":""}'),
header?: string(name='header', description='header', example='{}'),
moduleName?: string(name='moduleName', example='avatar'),
operationName?: string(name='operationName', example='GetProject'),
userId?: string(name='userId', example='123456'),
}
model SendSdkStreamMessageResponseBody = {
commonStreamMessage?: string(name='commonStreamMessage', example='{"id":"123"}'),
}
model SendSdkStreamMessageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SendSdkStreamMessageResponseBody(name='body'),
}
/**
* @summary 发送sdk流式消息
*
* @param request SendSdkStreamMessageRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SendSdkStreamMessageResponse
*/
async function sendSdkStreamMessageWithOptions(request: SendSdkStreamMessageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SendSdkStreamMessageResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.data)) {
body['data'] = request.data;
}
if (!Util.isUnset(request.header)) {
body['header'] = request.header;
}
if (!Util.isUnset(request.moduleName)) {
body['moduleName'] = request.moduleName;
}
if (!Util.isUnset(request.operationName)) {
body['operationName'] = request.operationName;
}
if (!Util.isUnset(request.userId)) {
body['userId'] = request.userId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SendSdkStreamMessage',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/sdk/stream/sendMessage`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 发送sdk流式消息
*
* @param request SendSdkStreamMessageRequest
* @return SendSdkStreamMessageResponse
*/
async function sendSdkStreamMessage(request: SendSdkStreamMessageRequest): SendSdkStreamMessageResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return sendSdkStreamMessageWithOptions(request, headers, runtime);
}
model SendTextMsgRequest {
projectId?: string(name='projectId', example='126000030'),
requestId?: string(name='requestId', example='52775239-1575-5C07-A4AE-1835D120E4A6'),
sessionId?: string(name='sessionId', example='tcm9xac9dsfbfgm8hf5k94l3cqybwh9o3mn0iuyytdgd9qoejxf1crxsdvuvr8fu0zudk5px4vsa3e3fgcclplkiuo7kyy3sqgscvhejmooblaiv64ww8cvlxvin2urzyhooqj33y7gvodef0sxn22n9q58o7xlupabiknxsv46qe7kof8nuc4be8kyhi01'),
text?: string(name='text'),
type?: int32(name='type', example='1'),
}
model SendTextMsgResponseBody = {
requestId?: string(name='requestId', example='827BF714-19E7-51B5-A434-C21BFEE05983'),
status?: string(name='status', example='SUCCESS'),
}
model SendTextMsgResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SendTextMsgResponseBody(name='body'),
}
/**
* @summary 发送文本消息
*
* @param request SendTextMsgRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SendTextMsgResponse
*/
async function sendTextMsgWithOptions(request: SendTextMsgRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SendTextMsgResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.requestId)) {
body['requestId'] = request.requestId;
}
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
if (!Util.isUnset(request.text)) {
body['text'] = request.text;
}
if (!Util.isUnset(request.type)) {
body['type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SendTextMsg',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/sendTextMsg`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 发送文本消息
*
* @param request SendTextMsgRequest
* @return SendTextMsgResponse
*/
async function sendTextMsg(request: SendTextMsgRequest): SendTextMsgResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return sendTextMsgWithOptions(request, headers, runtime);
}
model StartAvatarSessionRequest {
channelToken?: string(name='channelToken'),
customPushUrl?: string(name='customPushUrl'),
customUserId?: string(name='customUserId'),
projectId?: string(name='projectId', example='13534711288320'),
requestId?: string(name='requestId', example='15ED6083-B0B8-5B2A-BEDB-94A5C687C812'),
}
model StartAvatarSessionResponseBody = {
channelToken?: string(name='channelToken'),
requestId?: string(name='requestId', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
sessionId?: string(name='sessionId', example='121dlsga4o7golrl1hoja'),
token?: string(name='token'),
webSocketUrl?: string(name='webSocketUrl'),
}
model StartAvatarSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartAvatarSessionResponseBody(name='body'),
}
/**
* @summary 启动会话
*
* @param request StartAvatarSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return StartAvatarSessionResponse
*/
async function startAvatarSessionWithOptions(request: StartAvatarSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StartAvatarSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.channelToken)) {
body['channelToken'] = request.channelToken;
}
if (!Util.isUnset(request.customPushUrl)) {
body['customPushUrl'] = request.customPushUrl;
}
if (!Util.isUnset(request.customUserId)) {
body['customUserId'] = request.customUserId;
}
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.requestId)) {
body['requestId'] = request.requestId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'StartAvatarSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/startAvatarSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 启动会话
*
* @param request StartAvatarSessionRequest
* @return StartAvatarSessionResponse
*/
async function startAvatarSession(request: StartAvatarSessionRequest): StartAvatarSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return startAvatarSessionWithOptions(request, headers, runtime);
}
model StopAvatarSessionRequest {
projectId?: string(name='projectId', example='124900036'),
sessionId?: string(name='sessionId', example='121dlsga4o7golrl1hojazg0u9lvysk0uyczgd79be2a4hkr9ijrblmb5qohi5iaja3p5j633doqj4t2uu3sek2i49hzkao0bli4bch4tnloyx22odd7sot9dxl5xfd0hbp7fl9dehnqofkb9csebf0nuezj8bwgec8ei6dby0encu5y88ky6oqensuqnj'),
}
model StopAvatarSessionResponseBody = {
requestId?: string(name='requestId', example='725E87CD-F2DE-5FC4-8A09-2EBDFBF26DAA'),
status?: string(name='status', example='Stopped'),
}
model StopAvatarSessionResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopAvatarSessionResponseBody(name='body'),
}
/**
* @summary 停止会话
*
* @param request StopAvatarSessionRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return StopAvatarSessionResponse
*/
async function stopAvatarSessionWithOptions(request: StopAvatarSessionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StopAvatarSessionResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.projectId)) {
body['projectId'] = request.projectId;
}
if (!Util.isUnset(request.sessionId)) {
body['sessionId'] = request.sessionId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'StopAvatarSession',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/avatar/project/stopAvatarSession`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 停止会话
*
* @param request StopAvatarSessionRequest
* @return StopAvatarSessionResponse
*/
async function stopAvatarSession(request: StopAvatarSessionRequest): StopAvatarSessionResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return stopAvatarSessionWithOptions(request, headers, runtime);
}
model StopProjectTaskRequest {
taskId?: string(name='taskId', example='1111111'),
}
model StopProjectTaskResponseBody = {
requestId?: string(name='requestId', example='86A90C40-D1AB-50DA-A4B1-0D545F80F2FE'),
success?: boolean(name='success', example='True'),
}
model StopProjectTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopProjectTaskResponseBody(name='body'),
}
/**
* @summary 视频合成任务停止
*
* @param request StopProjectTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return StopProjectTaskResponse
*/
async function stopProjectTaskWithOptions(request: StopProjectTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StopProjectTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.taskId)) {
body['taskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'StopProjectTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/project/stop`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 视频合成任务停止
*
* @param request StopProjectTaskRequest
* @return StopProjectTaskResponse
*/
async function stopProjectTask(request: StopProjectTaskRequest): StopProjectTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return stopProjectTaskWithOptions(request, headers, runtime);
}
model SubmitImageToVideoTaskRequest {
imageUrl?: string(name='imageUrl', example='http://xxx/image.png'),
posPrompt?: string(name='posPrompt'),
}
model SubmitImageToVideoTaskResponseBody = {
message?: string(name='message', example='job added successfully'),
requestId?: string(name='requestId', example='53AED51A-74CE-57CE-B1BF-2703F314EEC8'),
success?: boolean(name='success', example='True'),
taskId?: string(name='taskId', example='868125994191405056'),
}
model SubmitImageToVideoTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SubmitImageToVideoTaskResponseBody(name='body'),
}
/**
* @summary 提交图片转视频任务
*
* @param request SubmitImageToVideoTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SubmitImageToVideoTaskResponse
*/
async function submitImageToVideoTaskWithOptions(request: SubmitImageToVideoTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SubmitImageToVideoTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.imageUrl)) {
body['imageUrl'] = request.imageUrl;
}
if (!Util.isUnset(request.posPrompt)) {
body['posPrompt'] = request.posPrompt;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SubmitImageToVideoTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/video/imageToVideo/task`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 提交图片转视频任务
*
* @param request SubmitImageToVideoTaskRequest
* @return SubmitImageToVideoTaskResponse
*/
async function submitImageToVideoTask(request: SubmitImageToVideoTaskRequest): SubmitImageToVideoTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return submitImageToVideoTaskWithOptions(request, headers, runtime);
}
model SubmitProjectTaskRequest {
frames?: [
{
index?: int32(name='index', example='1'),
layers?: [
{
height?: int32(name='height', example='222'),
index?: int32(name='index', example='1'),
material?: {
anchorStyleLevel?: string(name='anchorStyleLevel'),
format?: string(name='format', example='video/mp4'),
id?: string(name='id', example='38863'),
mask?: {
url?: string(name='url'),
}(name='mask'),
speed?: string(name='speed'),
url?: string(name='url', example='https://meeting.dingtalk.com/j/1COFppy0POR'),
volume?: int32(name='volume'),
}(name='material'),
positionX?: int32(name='positionX', example='11'),
positionY?: int32(name='positionY', example='22'),
type?: string(name='type', example='ANCHOR'),
width?: int32(name='width', example='111'),
}
](name='layers'),
subtitle?: {
alignment?: string(name='alignment', example='BottomLeft'),
backgroundColor?: string(name='backgroundColor', example='#ffffff'),
font?: string(name='font', example='SimSun'),
fontColor?: string(name='fontColor', example='#ffffff'),
fontSize?: int32(name='fontSize', example='32'),
maxCharLength?: int32(name='maxCharLength', example='11'),
positionX?: int32(name='positionX', example='2'),
positionY?: int32(name='positionY', example='1'),
textHeight?: int32(name='textHeight', example='22'),
textWidth?: int32(name='textWidth', example='11'),
}(name='subtitle'),
videoScript?: {
audioUrl?: string(name='audioUrl', example='https://meeting.dingtalk.com/j/1COFppy0POR'),
emotion?: string(name='emotion'),
pitchRate?: string(name='pitchRate'),
speechOpen?: boolean(name='speechOpen'),
speedRate?: string(name='speedRate', example='2.0'),
textContent?: string(name='textContent'),
type?: string(name='type', example='TEXT'),
voiceLanguage?: string(name='voiceLanguage'),
voiceTemplateId?: long(name='voiceTemplateId', example='11'),
volume?: int32(name='volume', example='20'),
}(name='videoScript'),
}
](name='frames', description='frame'),
scaleType?: string(name='scaleType', example='9:16'),
subtitleTag?: int32(name='subtitleTag', example='1'),
transparentBackground?: int32(name='transparentBackground'),
}
model SubmitProjectTaskResponseBody = {
requestId?: string(name='requestId', example='551FF252-6CFC-5DDA-9F84-9B07302385C2'),
taskId?: string(name='taskId', example='313123123'),
}
model SubmitProjectTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SubmitProjectTaskResponseBody(name='body'),
}
/**
* @summary 提交离线数字人合成任务
*
* @param request SubmitProjectTaskRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return SubmitProjectTaskResponse
*/
async function submitProjectTaskWithOptions(request: SubmitProjectTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SubmitProjectTaskResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.frames)) {
body['frames'] = request.frames;
}
if (!Util.isUnset(request.scaleType)) {
body['scaleType'] = request.scaleType;
}
if (!Util.isUnset(request.subtitleTag)) {
body['subtitleTag'] = request.subtitleTag;
}
if (!Util.isUnset(request.transparentBackground)) {
body['transparentBackground'] = request.transparentBackground;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SubmitProjectTask',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/digitalHuman/project/submitProjectTask`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 提交离线数字人合成任务
*
* @param request SubmitProjectTaskRequest
* @return SubmitProjectTaskResponse
*/
async function submitProjectTask(request: SubmitProjectTaskRequest): SubmitProjectTaskResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return submitProjectTaskWithOptions(request, headers, runtime);
}
model TransferPortraitStyleRequest {
height?: int32(name='height', example='500'),
imageUrl?: string(name='imageUrl', example='WWW'),
numbers?: int32(name='numbers', example='4'),
redrawAmplitude?: int32(name='redrawAmplitude', example='1'),
style?: int32(name='style', example='1'),
width?: int32(name='width', example='500'),
}
model TransferPortraitStyleResponseBody = {
requestId?: string(name='requestId', description='Id of the request', example='725E87CD-F2DE-5FC4-8A09-2EBDFBF26DAA'),
taskId?: string(name='taskId', example='313123123'),
}
model TransferPortraitStyleResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TransferPortraitStyleResponseBody(name='body'),
}
/**
* @summary 人像风格变化
*
* @param request TransferPortraitStyleRequest
* @param headers map
* @param runtime runtime options for this request RuntimeOptions
* @return TransferPortraitStyleResponse
*/
async function transferPortraitStyleWithOptions(request: TransferPortraitStyleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): TransferPortraitStyleResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.height)) {
body['height'] = request.height;
}
if (!Util.isUnset(request.imageUrl)) {
body['imageUrl'] = request.imageUrl;
}
if (!Util.isUnset(request.numbers)) {
body['numbers'] = request.numbers;
}
if (!Util.isUnset(request.redrawAmplitude)) {
body['redrawAmplitude'] = request.redrawAmplitude;
}
if (!Util.isUnset(request.style)) {
body['style'] = request.style;
}
if (!Util.isUnset(request.width)) {
body['width'] = request.width;
}
var req = new OpenApi.OpenApiRequest{
headers = headers,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'TransferPortraitStyle',
version = '2024-03-13',
protocol = 'HTTPS',
pathname = `/yic/yic-console/openService/v1/images/portrait/transferPortraitStyle`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 人像风格变化
*
* @param request TransferPortraitStyleRequest
* @return TransferPortraitStyleResponse
*/
async function transferPortraitStyle(request: TransferPortraitStyleRequest): TransferPortraitStyleResponse {
var runtime = new Util.RuntimeOptions{};
var headers : map[string]string = {};
return transferPortraitStyleWithOptions(request, headers, runtime);
}