mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
debug backend API for TAB 'search' (#2389)
### What problem does this PR solve? #2247 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -218,7 +218,7 @@ def chat(dialog, messages, stream=True, **kwargs):
|
||||
for ans in chat_mdl.chat_streamly(prompt, msg[1:], gen_conf):
|
||||
answer = ans
|
||||
delta_ans = ans[len(last_ans):]
|
||||
if num_tokens_from_string(delta_ans) < 12:
|
||||
if num_tokens_from_string(delta_ans) < 16:
|
||||
continue
|
||||
last_ans = answer
|
||||
yield {"answer": answer, "reference": {}, "audio_binary": tts(tts_mdl, delta_ans)}
|
||||
@ -404,7 +404,6 @@ def rewrite(tenant_id, llm_id, question):
|
||||
|
||||
|
||||
def tts(tts_mdl, text):
|
||||
return
|
||||
if not tts_mdl or not text: return
|
||||
bin = b""
|
||||
for chunk in tts_mdl.tts(text):
|
||||
|
||||
Reference in New Issue
Block a user