106.51.72.204 上的gitea重新初始化,提交到远程
Some checks failed
tests / ragflow_tests (push) Has been cancelled

This commit is contained in:
qcloud
2025-10-09 16:55:45 +08:00
parent c44e6715a0
commit 074747f902
7 changed files with 23085 additions and 6073 deletions

View File

@@ -670,6 +670,9 @@ def chat(dialog, messages, stream=True, **kwargs):
else:
tts_mdl = LLMBundle(dialog.tenant_id, LLMType.TTS, dialog.tts_id)
if not kwargs.get("voice"): # 20251007 cyx 修改没有传入voice 参数则不需要生成tts
kwargs['tts_disable'] = True
tts_sample_rate = kwargs.get("tts_sample_rate",8000) # 默认为8K
tts_stream_format = kwargs.get("tts_stream_format","mp3") # 默认为mp3格式
# try to use sql if field mapping is good to go
@@ -780,6 +783,7 @@ def chat(dialog, messages, stream=True, **kwargs):
last_ans = ""
answer = ""
audio_url = None
tts_session_id = None
if not kwargs.get('tts_disable'):
# 创建TTS会话提前初始化
tts_session_id = stream_manager.create_session(tts_mdl,sample_rate=tts_sample_rate,stream_format=tts_stream_format,