Skip to content

Commit 5d726cf

Browse files
committed
fix: 修复首次对话message大于1024报错 #1467
1 parent a7b8514 commit 5d726cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/application/serializers/chat_message_serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def append_chat_record(self, chat_record: ChatRecord, client_id=None):
124124
if self.application.id is not None:
125125
# 插入数据库
126126
if not QuerySet(Chat).filter(id=self.chat_id).exists():
127-
Chat(id=self.chat_id, application_id=self.application.id, abstract=chat_record.problem_text,
127+
Chat(id=self.chat_id, application_id=self.application.id, abstract=chat_record.problem_text[0:1024],
128128
client_id=client_id).save()
129129
# 插入会话记录
130130
chat_record.save()

0 commit comments

Comments
 (0)