fix: generate summary error when tokens=4097 (#488)

This commit is contained in:
John Wang 2023-06-29 12:54:50 +08:00 committed by GitHub
commit b9b0866a46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -28,7 +28,7 @@ def generate_conversation_summary_task(conversation_id: str):
try:
# get conversation messages count
history_message_count = conversation.message_count
if history_message_count >= 5:
if history_message_count >= 5 and not conversation.summary:
app_model = conversation.app
if not app_model:
return