4.7.1-alpha2 (#1153)
Co-authored-by: UUUUnotfound <31206589+UUUUnotfound@users.noreply.github.com> Co-authored-by: Hexiao Zhang <731931282qq@gmail.com> Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ export enum ModuleInputKeyEnum {
|
||||
userChatInput = 'userChatInput',
|
||||
questionGuide = 'questionGuide',
|
||||
tts = 'tts',
|
||||
whisper = 'whisper',
|
||||
answerText = 'text',
|
||||
agents = 'agents', // cq agent key
|
||||
|
||||
|
||||
18
packages/global/core/module/type.d.ts
vendored
18
packages/global/core/module/type.d.ts
vendored
@@ -63,24 +63,6 @@ export type ModuleItemType = {
|
||||
};
|
||||
|
||||
/* --------------- function type -------------------- */
|
||||
// variable
|
||||
export type VariableItemType = {
|
||||
id: string;
|
||||
key: string;
|
||||
label: string;
|
||||
type: `${VariableInputEnum}`;
|
||||
required: boolean;
|
||||
maxLen: number;
|
||||
enums: { value: string }[];
|
||||
};
|
||||
// tts
|
||||
export type AppTTSConfigType = {
|
||||
type: 'none' | 'web' | 'model';
|
||||
model?: string;
|
||||
voice?: string;
|
||||
speed?: number;
|
||||
};
|
||||
|
||||
export type SelectAppItemType = {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
@@ -6,10 +6,12 @@ import {
|
||||
variableMap
|
||||
} from './constants';
|
||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from './node/type';
|
||||
import { AppTTSConfigType, ModuleItemType, VariableItemType } from './type';
|
||||
import { ModuleItemType } from './type';
|
||||
import type { VariableItemType, AppTTSConfigType, AppWhisperConfigType } from '../app/type';
|
||||
import { Input_Template_Switch } from './template/input';
|
||||
import { EditorVariablePickerType } from '../../../web/components/common/Textarea/PromptEditor/type';
|
||||
import { Output_Template_Finish } from './template/output';
|
||||
import { defaultWhisperConfig } from '../app/constants';
|
||||
|
||||
/* module */
|
||||
export const getGuideModule = (modules: ModuleItemType[]) =>
|
||||
@@ -30,11 +32,16 @@ export const splitGuideModule = (guideModules?: ModuleItemType) => {
|
||||
(item) => item.key === ModuleInputKeyEnum.tts
|
||||
)?.value || { type: 'web' };
|
||||
|
||||
const whisperConfig: AppWhisperConfigType =
|
||||
guideModules?.inputs?.find((item) => item.key === ModuleInputKeyEnum.whisper)?.value ||
|
||||
defaultWhisperConfig;
|
||||
|
||||
return {
|
||||
welcomeText,
|
||||
variableModules,
|
||||
questionGuide,
|
||||
ttsConfig
|
||||
ttsConfig,
|
||||
whisperConfig
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user