Skip to content

Commit

Permalink
feat: remove sw
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 committed Nov 12, 2024
1 parent 767df83 commit ca91d80
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 40 deletions.
2 changes: 1 addition & 1 deletion demo/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './global.css'

export const metadata: Metadata = {
title: "TEN Agent",
description: "Shengwang Conversational AI Agent",
description: "Conversational AI Agent",
appleWebApp: {
capable: true,
statusBarStyle: "black",
Expand Down
81 changes: 43 additions & 38 deletions demo/src/common/constant.ts
Original file line number Diff line number Diff line change
@@ -1,98 +1,103 @@
import { IOptions, ColorItem, LanguageOptionItem, VoiceOptionItem, GraphOptionItem } from "@/types"
export const GITHUB_URL = "https://github.com/TEN-framework/TEN-Agent"
export const OPTIONS_KEY = "__options__"
export const AGENT_SETTINGS_KEY = "__agent_settings__"
import {
ColorItem,
GraphOptionItem,
IOptions,
LanguageOptionItem,
VoiceOptionItem,
} from "@/types";
export const GITHUB_URL = "https://github.com/TEN-framework/TEN-Agent";
export const OPTIONS_KEY = "__options__";
export const AGENT_SETTINGS_KEY = "__agent_settings__";
export const DEFAULT_OPTIONS: IOptions = {
channel: "",
userName: "",
userId: 0
}
userId: 0,
};

export const DEFAULT_AGENT_SETTINGS = {
greeting: "",
prompt: ""
}
prompt: "",
};

export const DESCRIPTION = "Shengwang Conversational AI Agent"
export const DESCRIPTION = "Conversational AI Agent";
export const LANGUAGE_OPTIONS: LanguageOptionItem[] = [
{
label: "English",
value: "en-US"
value: "en-US",
},
{
label: "Chinese",
value: "zh-CN"
value: "zh-CN",
},
{
label: "Korean",
value: "ko-KR"
value: "ko-KR",
},
{
label: "Japanese",
value: "ja-JP"
}
]
value: "ja-JP",
},
];
export const GRAPH_OPTIONS: GraphOptionItem[] = [
{
label: "Voice Agent - OpenAI LLM + Azure TTS",
value: "va.openai.azure"
value: "va.openai.azure",
},
{
label: "Voice Agent with Vision - OpenAI LLM + Azure TTS",
value: "camera.va.openai.azure"
value: "camera.va.openai.azure",
},
// {
// label: "Voice Agent with Knowledge - RAG + Qwen LLM + Cosy TTS",
// value: "va.qwen.rag"
// },
{
label: "Voice Agent with OpenAI Realtime API (Beta)",
value: "va.openai.v2v"
value: "va.openai.v2v",
},
{
label: "Voice Agent with OpenAI Realtime API (Beta) + FishAudio TTS",
value: "va.openai.v2v.fish"
value: "va.openai.v2v.fish",
},
{
label: "Voice Agent with Minimax",
value: "va.minimax.azure"
}
]
value: "va.minimax.azure",
},
];

export const isRagGraph = (graphName: string) => {
return graphName === "va.qwen.rag"
}
return graphName === "va.qwen.rag";
};

export const VOICE_OPTIONS: VoiceOptionItem[] = [
{
label: "Male",
value: "male"
value: "male",
},
{
label: "Female",
value: "female"
}
]
value: "female",
},
];
export const COLOR_LIST: ColorItem[] = [{
active: "#0888FF",
default: "#143354"
default: "#143354",
}, {
active: "#563FD8",
default: "#2C2553"
},
{
default: "#2C2553",
}, {
active: "#18A957",
default: "#173526"
default: "#173526",
}, {
active: "#FFAB08",
default: "#423115"
default: "#423115",
}, {
active: "#FD5C63",
default: "#462629"
default: "#462629",
}, {
active: "#E225B2",
default: "#481C3F"
}]
default: "#481C3F",
}];

export type VoiceTypeMap = {
[voiceType: string]: string;
Expand All @@ -104,4 +109,4 @@ export type VendorNameMap = {

export type LanguageMap = {
[language: string]: VendorNameMap;
};
};
2 changes: 1 addition & 1 deletion demo/src/platform/pc/description/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Description = () => {

return <div className={styles.description}>
<span className={styles.title}>Description</span>
<span className={styles.text}>Shengwang Conversational AI Agent</span>
<span className={styles.text}>Conversational AI Agent</span>
<span className={`${styles.btnConnect} ${agentConnected ? styles.disconnect : ''}`} onClick={onClickConnect} onKeyUp={onClickConnect} onKeyDown={onClickConnect} onKeyPress={onClickConnect}>
<span className={`${styles.btnText} ${agentConnected ? styles.disconnect : ''}`}>
{!agentConnected ? "Connect" : "Disconnect"}
Expand Down

0 comments on commit ca91d80

Please sign in to comment.