From 59133b9d8d034b979c4d59ef1f940f97aa3cdf9d Mon Sep 17 00:00:00 2001 From: JoeyZhou Date: Tue, 1 Apr 2025 23:56:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?config=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84api=20key=E7=94=B3=E8=AF=B7=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index 7289743b..7e712a36 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -172,6 +172,8 @@ ASR: access_token: 你的火山引擎语音合成服务access_token cluster: volcengine_input_common output_dir: tmp/ + # 可以在这里申请相关Key等信息 + # https://console.volcengine.com/speech/app VAD: SileroVAD: threshold: 0.5 @@ -263,6 +265,8 @@ LLM: bot_id: "你的bot_id" user_id: "你的user_id" personal_access_token: 你的coze个人令牌 + # 你可以在这里找到个人令牌 + # https://www.coze.cn/open/oauth/pats LMStudioLLM: # 定义LLM API类型 type: openai @@ -274,6 +278,8 @@ LLM: type: fastgpt # 如果使用fastgpt,配置文件里prompt(提示词)是无效的,需要在fastgpt控制台设置提示词 base_url: https://host/api/v1 + # 你可以在这里找到你的api_key + # https://cloud.tryfastgpt.ai/account/apikey api_key: fastgpt-xxx variables: k: "v" @@ -491,6 +497,8 @@ TTS: OpenAITTS: # openai官方文本转语音服务,可支持全球大多数语种 type: openai + # 你可以在这里获取到 api key + # https://platform.openai.com/api-keys api_key: 你的openai api key # 国内需要使用代理 api_url: https://api.openai.com/v1/audio/speech From 82b1548ae0e2a5a035689fad3fa9afe306566716 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Wed, 2 Apr 2025 09:23:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update:=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaozhi/modules/security/oauth2/Oauth2Filter.java | 2 -- main/xiaozhi-server/config.yaml | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/main/manager-api/src/main/java/xiaozhi/modules/security/oauth2/Oauth2Filter.java b/main/manager-api/src/main/java/xiaozhi/modules/security/oauth2/Oauth2Filter.java index e66327f5..aad888df 100644 --- a/main/manager-api/src/main/java/xiaozhi/modules/security/oauth2/Oauth2Filter.java +++ b/main/manager-api/src/main/java/xiaozhi/modules/security/oauth2/Oauth2Filter.java @@ -82,8 +82,6 @@ public class Oauth2Filter extends AuthenticatingFilter { httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin()); try { - // 处理登录失败的异常 - logger.error("onLoginFailure:登录失败!", e); Throwable throwable = e.getCause() == null ? e : e.getCause(); Result r = new Result().error(ErrorCode.UNAUTHORIZED, throwable.getMessage()); diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index c5fe3451..60ab7ab4 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -182,13 +182,13 @@ ASR: model_dir: models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17 output_dir: tmp/ DoubaoASR: + # 可以在这里申请相关Key等信息 + # https://console.volcengine.com/speech/app type: doubao appid: 你的火山引擎语音合成服务appid access_token: 你的火山引擎语音合成服务access_token cluster: volcengine_input_common output_dir: tmp/ - # 可以在这里申请相关Key等信息 - # https://console.volcengine.com/speech/app TencentASR: # token申请地址:https://console.cloud.tencent.com/cam/capi # 免费领取资源:https://console.cloud.tencent.com/asr/resourcebundle @@ -284,12 +284,12 @@ LLM: CozeLLM: # 定义LLM API类型 type: coze + # 你可以在这里找到个人令牌 + # https://www.coze.cn/open/oauth/pats # bot_id和user_id的内容写在引号之内 bot_id: "你的bot_id" user_id: "你的user_id" personal_access_token: 你的coze个人令牌 - # 你可以在这里找到个人令牌 - # https://www.coze.cn/open/oauth/pats LMStudioLLM: # 定义LLM API类型 type: openai