fix/various fixes
This commit is contained in:
@@ -6,7 +6,12 @@ from langchain_openai import ChatOpenAI
|
||||
|
||||
|
||||
class DeepSeekLLMProvider:
|
||||
"""LangChain-based LLM adapter for DeepSeek and OpenAI-compatible APIs."""
|
||||
"""LangChain-based LLM adapter for DeepSeek and OpenAI-compatible APIs.
|
||||
|
||||
`langchain_llm` 供 Agent / 任务同步调用;若需 JSON object 模式,请用
|
||||
`app.core.langchain_llm.bind_json_object_mode` 绑定,勿使用已废弃的
|
||||
`bind(model_kwargs={"response_format": ...})`。
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -127,7 +127,12 @@ class TencentTTSProvider:
|
||||
logger.error("Tencent TTS credentials not configured")
|
||||
return b""
|
||||
|
||||
voice_type = VOICE_MAP.get(voice.lower(), self._voice_type)
|
||||
# Default "alloy" aligns with OpenAI TTS naming; Tencent uses VoiceType IDs from settings.
|
||||
v = voice.lower()
|
||||
if v == "alloy":
|
||||
voice_type = self._voice_type
|
||||
else:
|
||||
voice_type = VOICE_MAP.get(v, self._voice_type)
|
||||
chunks = _chunk_text(text)
|
||||
if not chunks:
|
||||
return b""
|
||||
|
||||
Reference in New Issue
Block a user