mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
parent
7fa38677f7
commit
f20ce4c1d2
|
|
@ -341,10 +341,12 @@ class ChatMessageSerializer(serializers.Serializer):
|
|||
user_id = chat_info.application.user_id
|
||||
chat_record_id = self.data.get('chat_record_id')
|
||||
chat_record = None
|
||||
history_chat_record = chat_info.chat_record_list
|
||||
if chat_record_id is not None:
|
||||
chat_record = self.get_chat_record(chat_info, chat_record_id)
|
||||
history_chat_record = [r for r in chat_info.chat_record_list if str(r.id) != chat_record_id]
|
||||
work_flow_manage = WorkflowManage(Flow.new_instance(chat_info.work_flow_version.work_flow),
|
||||
{'history_chat_record': chat_info.chat_record_list, 'question': message,
|
||||
{'history_chat_record': history_chat_record, 'question': message,
|
||||
'chat_id': chat_info.chat_id, 'chat_record_id': str(
|
||||
uuid.uuid1()) if chat_record is None else chat_record.id,
|
||||
'stream': stream,
|
||||
|
|
|
|||
|
|
@ -251,9 +251,9 @@ export class ChatRecordManage {
|
|||
(node_info.divider_content ? node_info.divider_content.splice(0).join('') : '') +
|
||||
node_info.current_node.buffer.splice(0).join(''),
|
||||
node_info.answer_text_list_index,
|
||||
current_node.chat_record_id,
|
||||
current_node.runtime_node_id,
|
||||
current_node.child_node
|
||||
node_info.current_node.chat_record_id,
|
||||
node_info.current_node.runtime_node_id,
|
||||
node_info.current_node.child_node
|
||||
)
|
||||
if (node_info.current_node.buffer.length == 0) {
|
||||
node_info.current_node.is_end = true
|
||||
|
|
|
|||
|
|
@ -331,8 +331,10 @@ onMounted(() => {
|
|||
set(props.nodeModel.properties.node_data, 'is_result', true)
|
||||
}
|
||||
}
|
||||
|
||||
set(props.nodeModel, 'validate', validate)
|
||||
if (!chat_data.value.dialogue_type) {
|
||||
chat_data.value.dialogue_type = 'WORKFLOW'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue