From 9932d60dee9250dfe59a90ef5fc09728cc72a713 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Thu, 20 Mar 2025 16:58:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=97=A5=E5=BF=97logger=E4=B8=8D=E5=AD=98=E5=9C=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/config.yaml | 3 ++- main/xiaozhi-server/core/providers/llm/openai/openai.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index 27a2f6c1..12497dbb 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -248,7 +248,8 @@ TTS: # 火山引擎语音合成服务,需要先在火山引擎控制台创建应用并获取appid和access_token # 山引擎语音一定要购买花钱,起步价30元,就有100并发了。如果用免费的只有2个并发,会经常报tts错误 # 购买服务后,购买免费的音色后,可能要等半小时左右,才能使用。 - # 地址:https://console.volcengine.com/speech/service/8 + # 普通音色在这里开通:https://console.volcengine.com/speech/service/8 + # 湾湾小何音色在这里开通:https://console.volcengine.com/speech/service/10007,开通后将下面的voice设置成zh_female_wanwanxiaohe_moon_bigtts api_url: https://openspeech.bytedance.com/api/v1/tts voice: BV001_streaming output_dir: tmp/ diff --git a/main/xiaozhi-server/core/providers/llm/openai/openai.py b/main/xiaozhi-server/core/providers/llm/openai/openai.py index b1a9a24e..c3732a22 100644 --- a/main/xiaozhi-server/core/providers/llm/openai/openai.py +++ b/main/xiaozhi-server/core/providers/llm/openai/openai.py @@ -64,5 +64,5 @@ class LLMProvider(LLMProviderBase): yield chunk.choices[0].delta.content, chunk.choices[0].delta.tool_calls except Exception as e: - self.logger.bind(tag=TAG).error(f"Error in function call streaming: {e}") + logger.bind(tag=TAG).error(f"Error in function call streaming: {e}") yield {"type": "content", "content": f"【OpenAI服务响应异常: {e}】"}