File size: 3,832 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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
import {
IOptions,
ColorItem,
LanguageOptionItem,
VoiceOptionItem,
GraphOptionItem,
ICozeSettings,
IDifySettings,
} from "@/types"
export const GITHUB_URL = "https://github.com/TEN-framework/TEN-Agent"
export const API_GH_GET_REPO_INFO =
"https://api.github.com/repos/TEN-framework/TEN-Agent"
export const OPTIONS_KEY = "__options__"
export const AGENT_SETTINGS_KEY = "__agent_settings__"
export const COZE_SETTINGS_KEY = "__coze_settings__"
export const DIFY_SETTINGS_KEY = "__dify_settings__"
export const DEFAULT_OPTIONS: IOptions = {
channel: "",
userName: "",
userId: 0,
appId: "",
token: "",
}
export const DEFAULT_AGENT_SETTINGS = {
greeting: "",
prompt: "",
}
export enum ECozeBaseUrl {
CN = "https://api.coze.cn",
GLOBAL = "https://api.coze.com",
}
export const DEFAULT_COZE_SETTINGS: ICozeSettings = {
token: "",
bot_id: "",
base_url: ECozeBaseUrl.GLOBAL,
}
export const DEFAULT_DIFY_SETTINGS: IDifySettings = {
api_key: "",
}
export const DESCRIPTION = "A Realtime Conversational AI Agent powered by TEN"
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 with QWQ-32B Reasoning",
value: "qwq_32b",
},
{
label: "Voice Agent with DeepSeek R1 Reasoning",
value: "deepseek_r1",
},
{
label: "Voice Agent Gemini 2.0 Realtime",
value: "va_gemini_v2v",
},
{
label: "Voice Agent with Dify",
value: "va_dify_azure",
},
{
label: "Voice Agent / STT + LLM + TTS",
value: "va_openai_azure",
},
// {
// label: "Voice Agent with Knowledge - RAG + Qwen LLM + Cosy TTS",
// value: "va_qwen_rag"
// },
{
label: "Voice Agent OpenAI Realtime",
value: "va_openai_v2v",
},
{
label: "Voice Agent OpenAI Realtime + Custom STT/TTS",
value: "va_openai_v2v_fish",
},
{
label: "Voice Agent Coze Bot + Azure TTS",
value: "va_coze_azure",
},
{
label: "Voice Story Teller with Image Generator",
value: "story_teller_stt_integrated",
},
{
label: "Voice Agent / STT + Nova Multimodal + TTS",
value: "va_nova_multimodal_aws",
},
]
export const isRagGraph = (graphName: string) => {
return graphName === "va_qwen_rag"
}
export const isLanguageSupported = (graphName: string) => {
return !["va_gemini_v2v"].includes(graphName)
}
export const isVoiceGenderSupported = (graphName: string) => {
return !["va_gemini_v2v"].includes(graphName)
}
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 VOICE_OPTIONS: VoiceOptionItem[] = [
{
label: "Male",
value: "male",
},
{
label: "Female",
value: "female",
},
]
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",
} |