Skip to content

Commit 94d1652

Browse files
liuruibinCopilot
andcommitted
fix: adjust history chat record check to allow for more than one entry in _run_extract function
Co-authored-by: Copilot <copilot@github.com>
1 parent 565bf7e commit 94d1652

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/application/long_term_memory/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _run_extract(workspace_id, application_id, chat_user_id, config, history_lim
133133
chat__chat_user_id=chat_user_id,
134134
).order_by('-create_time').only('problem_text', 'answer_text')[:history_limit]
135135
)
136-
if not history_chat_record:
136+
if len(history_chat_record) <= 1:
137137
return
138138

139139
chat_model = get_model_instance_by_model_workspace_id(

0 commit comments

Comments
 (0)