File size: 2,882 Bytes
87337b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
import {
IOptions,
ColorItem,
LanguageOptionItem,
VoiceOptionItem,
GraphOptionItem,
ITrulienceSettings,
} from "@/types";
export const GITHUB_URL = "https://github.com/TEN-framework/TEN-Agent";
export const OPTIONS_KEY = "__options__";
export const DEFAULT_OPTIONS: IOptions = {
channel: "",
userName: "",
userId: 0,
appId: "",
token: "",
};
export const DESCRIPTION =
"TEN Agent is an open-source multimodal AI agent that can speak, see, and access a knowledge base(RAG).";
export const LANGUAGE_OPTIONS: LanguageOptionItem[] = [
{
label: "English",
value: "en-US",
},
{
label: "Chinese",
value: "zh-CN",
},
{
label: "Korean",
value: "ko-KR",
},
{
label: "Japanese",
value: "ja-JP",
},
];
export const GRAPH_OPTIONS: GraphOptionItem[] = [
{
label: "Voice Agent - OpenAI LLM + Azure TTS",
value: "va_openai_azure",
},
{
label: "Voice Agent with Vision - OpenAI LLM + Azure TTS",
value: "camera_va_openai_azure",
},
//{
// label: "Voice Agent with Knowledge - RAG + Qwen LLM + Cosy TTS",
// value: "va_qwen_rag"
// },
];
export const isRagGraph = (graphName: string) => {
return graphName === "va_qwen_rag";
};
export const VOICE_OPTIONS: VoiceOptionItem[] = [
{
label: "Male",
value: "male",
},
{
label: "Female",
value: "female",
},
];
export enum VideoSourceType {
CAMERA = 'camera',
SCREEN = 'screen',
}
export const VIDEO_SOURCE_OPTIONS = [{
label: "Camera",
value: VideoSourceType.CAMERA,
}, {
label: "Screen Share",
value: VideoSourceType.SCREEN,
}]
export const COLOR_LIST: ColorItem[] = [
{
active: "#0888FF",
default: "#143354",
},
{
active: "#563FD8",
default: "#2C2553",
},
{
active: "#18A957",
default: "#173526",
},
{
active: "#FFAB08",
default: "#423115",
},
{
active: "#FD5C63",
default: "#462629",
},
{
active: "#E225B2",
default: "#481C3F",
},
];
export type VoiceTypeMap = {
[voiceType: string]: string;
};
export type VendorNameMap = {
[vendorName: string]: VoiceTypeMap;
};
export type LanguageMap = {
[language: string]: VendorNameMap;
};
export enum EMobileActiveTab {
AGENT = "agent",
CHAT = "chat",
}
export const MOBILE_ACTIVE_TAB_MAP = {
[EMobileActiveTab.AGENT]: "Agent",
[EMobileActiveTab.CHAT]: "Chat",
};
export const isLLM = (extensionName: string) => {
return extensionName === "llm" || extensionName === "v2v";
}
export const isEditModeOn = process.env.NEXT_PUBLIC_EDIT_GRAPH_MODE === "true";
export const TRULIENCE_SETTINGS_KEY = "__trulience__";
export const DEFAULT_TRULIENCE_OPTIONS: ITrulienceSettings = {
enabled: false,
avatarId: "",
avatarToken: "",
avatarDesktopLargeWindow: false,
animationURL: "https://trulience.com",
trulienceSDK: "https://trulience.com/sdk/trulience.sdk.js",
}; |