mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 08:33:53 +08:00
LLM和TTS采用适配器模式进行解耦,方便扩展更多服务平台调用
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import logging
|
||||
import requests
|
||||
from core.providers.llm.base import LLMProviderBase
|
||||
@@ -32,5 +33,6 @@ class LLMProvider(LLMProviderBase):
|
||||
if event.get('answer'):
|
||||
yield event['answer']
|
||||
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.error(f"Error in response generation: {e}")
|
||||
yield "【服务响应异常】"
|
||||
Reference in New Issue
Block a user