优化响应逻辑
This commit is contained in:
parent
0a4aaab824
commit
a155fd97a3
@ -54,6 +54,7 @@ def chat_post(
|
||||
yield make_chunk(message=f"Retriever error: {e}", status="error")
|
||||
return
|
||||
|
||||
yield make_chunk(status="generating")
|
||||
messages = history_manager.get_history_with_msg(modified_query, max_rounds=meta.get('history_round'))
|
||||
history_manager.add_user(query) # 注意这里使用原始查询
|
||||
logger.debug(f"Web history: {history_manager.messages}")
|
||||
|
||||
@ -77,6 +77,7 @@
|
||||
<div></div>
|
||||
</div>
|
||||
<div v-else-if="message.status == 'searching' && isStreaming" class="searching-msg"><i>正在检索……</i></div>
|
||||
<div v-else-if="message.status == 'generating' && isStreaming" class="searching-msg"><i>正在生成……</i></div>
|
||||
<div
|
||||
v-else-if="(message.text.length == 0 && message.status!='reasoning') || message.status == 'error' || (message.status != 'finished' && !isStreaming)"
|
||||
class="err-msg"
|
||||
@ -216,7 +217,6 @@ const meta = reactive(JSON.parse(localStorage.getItem('meta')) || {
|
||||
use_graph: false,
|
||||
use_web: false,
|
||||
graph_name: "neo4j",
|
||||
// use_rewrite_query: "off",
|
||||
selectedKB: null,
|
||||
stream: true,
|
||||
summary_title: false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user