update
This commit is contained in:
parent
4a959fc6c3
commit
93fc960028
@ -247,7 +247,23 @@ async def converse_with_chat_assistant(
|
||||
}
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(f"[KB_ES] 内部KB异常,fallback到RAGFlow: {e}")
|
||||
logger.warning(f"[KB_ES] 内部KB异常: {e}")
|
||||
if KBConfig.KB_FALLBACK == 'none':
|
||||
return StreamingResponse(
|
||||
stream_cached_response(
|
||||
'内部知识库检索失败,请稍后再试或补充更多关键词。',
|
||||
converse_params.chat_id,
|
||||
start_time,
|
||||
cache_source='kb_es_error'
|
||||
),
|
||||
media_type='text/event-stream',
|
||||
headers={
|
||||
'Cache-Control': 'no-cache',
|
||||
'Connection': 'keep-alive',
|
||||
'X-Accel-Buffering': 'no',
|
||||
'Transfer-Encoding': 'chunked'
|
||||
}
|
||||
)
|
||||
|
||||
logger.info(f'[RAG_SOURCE] 调用原生RAG服务 | chat_id={converse_params.chat_id} | question={converse_params.question}')
|
||||
result = RAGFlowService.converse_with_chat_assistant_services(converse_params)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user