fix: 文档轮询加载效果,未使用模型存在不能结束现象

This commit is contained in:
shaohuzhang1 2023-12-20 14:30:55 +08:00
parent 88447ebdd7
commit 6b7e0a98f6
2 changed files with 2 additions and 1 deletions

View File

@ -135,6 +135,7 @@ class ChatMessageSerializer(serializers.Serializer):
if chat_model is None:
def event_block_content(c: str):
yield 'data: ' + json.dumps({'chat_id': chat_id, 'id': _id, 'operate': paragraph is not None,
'is_end': True,
'content': c if c is not None else '抱歉,根据已知信息无法回答这个问题,请重新描述您的问题或提供更多信息~'}) + "\n\n"
chat_info.append_chat_message(
ChatMessage(_id, message, title, content, embedding_id, dataset_id, document_id,

View File

@ -238,7 +238,7 @@ function cellMouseLeave() {
function handleSizeChange() {
paginationConfig.current_page = 1
getList()
getList(true)
}
function getList(bool?: boolean) {