From 375d94ab26a0d4b8a073fbd59422448942bf3c64 Mon Sep 17 00:00:00 2001 From: fsy Date: Tue, 18 Mar 2025 21:03:48 +0800 Subject: [PATCH] =?UTF-8?q?api=E4=B8=AD=E4=BF=A1=E6=81=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/api.js | 100 ++++++++++++++++++++++---------------------- vite.config.js | 10 ++--- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/services/api.js b/src/services/api.js index 04e4383..826061c 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -35,67 +35,67 @@ class ApiService { const response = await this.client.post( `${this.baseUrl}/projects/${this.projectId}/join/`, { - name: channelName, - properties: { - channel: "testChannel", - token: "007eJxTYJBc1LqzN+VLw4SMTFNviZTzYeGSTz2UP69pceR+fcXAWFyBwcAw0TAlNSnZ0swk0STZLNEiJQ3IN0o0S041T0w0SamzvJneEMjIsCrrFwMjFIL43AwlqcUlzhmJeXmpOQwMABPJIos=", - agent_rtc_uid: 0, - remote_rtc_uids: ["*"], - enable_string_uid: false, - idle_timeout: 120, - llm: { - url: "/llm-api", - api_key: "sk-xVIc9b7EfY7LlPagF31d90F4736f4aE18cB91b5957A40506", - max_history: 10, - system_messages: [ + "name": "convaiconsole_149700", + "properties": { + "channel": "convaiconsole_149700", + "agent_rtc_uid": "54047", + "remote_rtc_uids": [ + "*" + ], + "enable_string_uid": true, + "idle_timeout": 120, + "llm": { + "url": "https://vip.apiyi.com/v1/chat/completions", + "api_key": "wN-fMujjNdcwJ2M3-MbhMHSF6-j_3dT3", + "max_history": 10, + "system_messages": [ { - role: "system", - content: "" + "role": "system", + "content": "" } ], - params: { - model: "deepseek-chat", - max_token: 1024 + "params": { + "model": "deepseek-chat", + "max_token": 1024 }, - greeting_message: "你好呀,有什么可以帮您?", - failure_message: "我出错了,请稍等!" + "greeting_message": "你好呀,有什么可以帮您?", + "failure_message": "我出错了,请稍等!" }, - asr: { - language: "zh-CN" + "asr": { + "language": "zh-CN" }, - vad: { - interrupt_duration_ms: 160, - prefix_padding_ms: 300, - silence_duration_ms: 480, - threshold: 0.5 + "vad": { + "interrupt_duration_ms": 160, + "prefix_padding_ms": 300, + "silence_duration_ms": 480, + "threshold": 0.5 }, - tts: { - vendor: "bytedance", - params: { - token: "wN-fMujjNdcwJ2M3-MbhMHSF6-j_3dT3", - app_id: "4417529362", - cluster: "volcano_tts", - voice_type: "BV700_streaming", - speed_ratio: 1.0, - volume_ratio: 1.0, - pitch_ratio: 1.0, - emotion: "happy" + "tts": { + "vendor": "bytedance", + "params": { + "token": "wN-fMujjNdcwJ2M3-MbhMHSF6-j_3dT3", + "app_id": "4417529362", + "cluster": "volcano_tts", + "voice_type": "BV700_streaming", + "speed_ratio": 1, + "volume_ratio": 1, + "pitch_ratio": 1, + "emotion": "" } - }, - parameters: { - transcript: { - enable: true, - protocol_version: "v2", - enable_words: false, - redundant: false + "parameters": { + "transcript": { + "enable": true, + "protocol_version": "v2", + "enable_words": false, + "redundant": false }, - enable_metrics: true, - audio_scenario: "default" + "enable_metrics": true, + "audio_scenario": "default" }, - token: "007eJxTYBDbc7v13v7dwVVOXVMOWv1jZlsa57TyYqDInTmtH+UcZroqMBgYJhqmpCYlW5qZJJokmyVapKQB+UaJZsmp5omJJinlZjfTGwIZGZYb8DIwQiGIL8KQnJ9XlpgJJIvzc1LjDQ0sTEzMGBgA4KQlrw==", - advanced_features: { - enable_aivad: true + "token": "007eJxTYHi+XWtqBkPmn71LGvdmPds7sfiQfomBxpt3XMfOC53fcjVegcHAMNEwJTUp2dLMJNEk2SzRIiUNyDdKNEtONU9MNEkpibmZ3hDIyPDYXo2JkQECQXwRhuT8vLLETCBZnJ+TGm9oYmluYMDAAACcPigI", + "advanced_features": { + "enable_aivad": false } } } diff --git a/vite.config.js b/vite.config.js index 5d48c08..06e3500 100644 --- a/vite.config.js +++ b/vite.config.js @@ -25,11 +25,11 @@ export default defineConfig({ 'Authorization': 'Basic OGRkM2EzOGUxNTJjNGU1NDlmNWMwOTg0YmRhYzc1ZTE6ZWY1MTI2ZTRmMWFlNGE5MWE0MzVhN2Q0ZDc0YzNlYjg=', } }, - '/llm-api':{ - target:'https://vip.apiyi.com/v1/chat/completions', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/llm-api/, ''), - } + // '/llm-api':{ + // target:'https://vip.apiyi.com/v1/chat/completions', + // changeOrigin: true, + // rewrite: (path) => path.replace(/^\/llm-api/, ''), + // } } }