fix: 答案不再包括思考过程;思考气泡和消息气泡不同时显示
This commit is contained in:
1 parent
b0fda9f081
commit
9313ff769d
9 files changed
+74
-34
No files matched your search
@@ -241,7 +241,7 @@ export function useChat() {
|
||||
conversationId: data?.conversation_id || conversationId.value,
|
||||
});
|
||||
|
||||
if (data.event === 'message' || data.event === 'agent_message') {
|
||||
if (data.event === 'message') {
|
||||
// event: message LLM 返回文本块事件,即:完整的文本以分块的方式输出。
|
||||
if (typeof data.answer === 'string' && data.answer.length > 0) {
|
||||
// answer: LLM 返回文本块内容
|
||||
@@ -253,11 +253,11 @@ export function useChat() {
|
||||
});
|
||||
}
|
||||
applyEventMetadata(botMsg, data);
|
||||
} else if (data.event === 'message_end' || data.event === 'workflow_finished') {
|
||||
} else if (data.event === 'message_end') {
|
||||
if (data.conversation_id) {
|
||||
conversationId.value = data.conversation_id;
|
||||
}
|
||||
// Some providers may put final answer on message_end/workflow events.
|
||||
// Some providers may put final answer on message_end event.
|
||||
if (typeof data.answer === 'string' && data.answer.length > 0) {
|
||||
botMsg.content += data.answer;
|
||||
console.debug('[chat][sse] append final answer', {
|
||||
|
||||
Reference in new issue
Block a user