fix/various fixes

This commit is contained in:
Kevin
2026-03-20 15:15:35 +08:00
parent 7f57f96c25
commit 7317bf10cd
112 changed files with 3790 additions and 2242 deletions

View File

@@ -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,

View File

@@ -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""