LLM和TTS采用适配器模式进行解耦,方便扩展更多服务平台调用

This commit is contained in:
HonestQiao
2025-02-11 23:32:32 +08:00
8 changed files with 93 additions and 73 deletions
+3 -1
View File
@@ -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 "【服务响应异常】"