fix: 修复首次对话message大于1024报错 #1467

This commit is contained in:
shaohuzhang1 2024-10-28 13:43:40 +08:00 committed by shaohuzhang1
parent a7b85143a1
commit 5d726cf538

View File

@ -124,7 +124,7 @@ class ChatInfo:
if self.application.id is not None:
# 插入数据库
if not QuerySet(Chat).filter(id=self.chat_id).exists():
Chat(id=self.chat_id, application_id=self.application.id, abstract=chat_record.problem_text,
Chat(id=self.chat_id, application_id=self.application.id, abstract=chat_record.problem_text[0:1024],
client_id=client_id).save()
# 插入会话记录
chat_record.save()