From 7c473b9ed1d782eac1e096a4f2da523018f39269 Mon Sep 17 00:00:00 2001 From: fsy Date: Thu, 20 Mar 2025 15:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86api=20=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E5=8F=82=E6=95=B0=E8=83=BD=E5=A4=9F=E9=80=9A=E8=AE=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/api.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/services/api.js b/src/services/api.js index 826061c..2e2fa34 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -30,15 +30,15 @@ class ApiService { * @param {string} agentRtcUid - The agent RTC UID * @returns {Promise} - The response from the API */ - async joinProject(channelName = 'convaiconsole_108446', agentRtcUid = '91482') { + async joinProject(channelName = 'convaiconsole_122624', agentRtcUid = '29501') { try { const response = await this.client.post( `${this.baseUrl}/projects/${this.projectId}/join/`, { - "name": "convaiconsole_149700", + "name": "convaiconsole_122624", "properties": { - "channel": "convaiconsole_149700", - "agent_rtc_uid": "54047", + "channel": "convaiconsole_122624", + "agent_rtc_uid": "29501", "remote_rtc_uids": [ "*" ], @@ -46,7 +46,7 @@ class ApiService { "idle_timeout": 120, "llm": { "url": "https://vip.apiyi.com/v1/chat/completions", - "api_key": "wN-fMujjNdcwJ2M3-MbhMHSF6-j_3dT3", + "api_key": "sk-xVIc9b7EfY7LlPagF31d90F4736f4aE18cB91b5957A40506", "max_history": 10, "system_messages": [ { @@ -55,7 +55,7 @@ class ApiService { } ], "params": { - "model": "deepseek-chat", + "model": "deepseek-r1", "max_token": 1024 }, "greeting_message": "你好呀,有什么可以帮您?", @@ -93,7 +93,7 @@ class ApiService { "enable_metrics": true, "audio_scenario": "default" }, - "token": "007eJxTYHi+XWtqBkPmn71LGvdmPds7sfiQfomBxpt3XMfOC53fcjVegcHAMNEwJTUp2dLMJNEk2SzRIiUNyDdKNEtONU9MNEkpibmZ3hDIyPDYXo2JkQECQXwRhuT8vLLETCBZnJ+TGm9oYmluYMDAAACcPigI", + "token": "007eJxTYEibc7f9w4Ebac5HtT9ej/CL7KzPrGb+GZmn6/G+kLVp8XsFBgPDRMOU1KRkSzOTRJNks0SLlDQg3yjRLDnVPDHRJGV67630hkBGhhvth1kZGSAQxBdhSM7PK0vMBJLF+Tmp8YZGRmZGJgwMAIF3KEg=", "advanced_features": { "enable_aivad": false } @@ -127,7 +127,6 @@ class ApiService { content: message } ); - return response.data; } catch (error) { console.error('Error sending message:', error);