fix enable annotation reply when collection is None (#2877)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong 2024-03-18 17:18:52 +08:00 committed by GitHub
parent 01108e6172
commit 4834eae887
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,7 @@ def enable_annotation_reply_task(job_id: str, app_id: str, user_id: str, tenant_
logging.info(
click.style('Delete annotation index error: {}'.format(str(e)),
fg='red'))
vector.add_texts(documents)
vector.create(documents)
db.session.commit()
redis_client.setex(enable_app_annotation_job_key, 600, 'completed')
end_at = time.perf_counter()