diff --git a/app/service/Interaction/templateStoryService.ts b/app/service/Interaction/templateStoryService.ts index c42764d..ffdc61a 100644 --- a/app/service/Interaction/templateStoryService.ts +++ b/app/service/Interaction/templateStoryService.ts @@ -70,7 +70,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { const templates = await templateStoryUseCase.getTemplateStoryList(); // templates.forEach(template => { // if (template.id === 'f944abad-f42b-4899-b54a-a6beb9d27805') { - // template.freeInputItem = { + // template.freeInput = { // user_tips: "How is coffee made?", // constraints: "", // free_input_text: "" @@ -78,7 +78,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { // // template.storyRole = []; // } // if (template.id === 'e7438cd8-a23d-4974-8cde-13b5671b410c') { - // // template.freeInputItem = { + // // template.freeInput = { // // user_tips: "Input an English word you wanna learn", // // constraints: "", // // free_input_text: "" @@ -258,7 +258,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { setIsLoading(true); // 没有角色以及道具 时,需要设置为true const one_query_mode = selectedTemplate?.storyRole?.length === 0 && selectedTemplate?.storyItem?.length === 0; - const script = selectedTemplate?.freeInputItem && selectedTemplate.freeInputItem.length > 0 ? selectedTemplate.freeInputItem[0].free_input_text : selectedTemplate?.generateText || ""; + const script = selectedTemplate?.freeInput && selectedTemplate.freeInput.length > 0 ? selectedTemplate.freeInput[0].free_input_text : selectedTemplate?.generateText || ""; const params: CreateMovieProjectV3Request = { script: script, @@ -268,7 +268,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { resolution, storyRole: selectedTemplate?.storyRole || [], storyItem: selectedTemplate?.storyItem || [], - freeInput: selectedTemplate?.freeInputItem || [], + freeInput: selectedTemplate?.freeInput || [], language, template_id: selectedTemplate?.template_id || "", one_query_mode: one_query_mode diff --git a/app/service/domain/Entities.ts b/app/service/domain/Entities.ts index bd39596..f1f70eb 100644 --- a/app/service/domain/Entities.ts +++ b/app/service/domain/Entities.ts @@ -173,7 +173,7 @@ export interface StoryTemplateEntity { photo_url: string; }[]; /** 自由输入文字 */ - freeInputItem: { + freeInput: { /** 用户提示,提示给用户需要输入什么内容 */ user_tips: string; /** 约束,可选,用于传给ai,让ai去拦截用户不符合约束的输入内容 */ diff --git a/components/ChatInputBox/H5TemplateDrawer.tsx b/components/ChatInputBox/H5TemplateDrawer.tsx index a0ca6c4..dab09b5 100644 --- a/components/ChatInputBox/H5TemplateDrawer.tsx +++ b/components/ChatInputBox/H5TemplateDrawer.tsx @@ -491,17 +491,17 @@ export const H5TemplateDrawer = ({