diff --git a/src/documents/tests/test_api_app_config.py b/src/documents/tests/test_api_app_config.py index 2418236bd..9b94fff17 100644 --- a/src/documents/tests/test_api_app_config.py +++ b/src/documents/tests/test_api_app_config.py @@ -844,7 +844,7 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase): with ( patch("documents.tasks.llmindex_index.apply_async") as mock_update, - patch("paperless.views.vector_store_file_exists") as mock_exists, + patch("paperless.views.llm_index_exists") as mock_exists, ): mock_exists.return_value = False self.client.patch( @@ -869,7 +869,7 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase): with ( patch("documents.tasks.llmindex_index.apply_async") as mock_update, - patch("paperless.views.vector_store_file_exists") as mock_exists, + patch("paperless.views.llm_index_exists") as mock_exists, ): mock_exists.return_value = True self.client.patch( @@ -890,7 +890,7 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase): with ( patch("documents.tasks.llmindex_index.apply_async") as mock_update, - patch("paperless.views.vector_store_file_exists") as mock_exists, + patch("paperless.views.llm_index_exists") as mock_exists, ): mock_exists.return_value = True self.client.patch( @@ -928,7 +928,7 @@ class TestApiAppConfig(DirectoriesMixin, APITestCase): with ( patch("documents.tasks.llmindex_index.apply_async") as mock_update, - patch("paperless.views.vector_store_file_exists") as mock_exists, + patch("paperless.views.llm_index_exists") as mock_exists, ): mock_exists.return_value = True self.client.patch( diff --git a/src/paperless/views.py b/src/paperless/views.py index 9ed4a2a87..2e3fb4d82 100644 --- a/src/paperless/views.py +++ b/src/paperless/views.py @@ -49,7 +49,7 @@ from paperless.serialisers import GroupSerializer from paperless.serialisers import PaperlessAuthTokenSerializer from paperless.serialisers import ProfileSerializer from paperless.serialisers import UserSerializer -from paperless_ai.indexing import vector_store_file_exists +from paperless_ai.indexing import llm_index_exists class PaperlessObtainAuthTokenView(ObtainAuthToken): @@ -467,7 +467,7 @@ class ApplicationConfigurationViewSet(ModelViewSet[ApplicationConfiguration]): or old_llm_context_size != new_llm_context_size ) rebuild_needed = new_ai_index_enabled and ( - not vector_store_file_exists() or embedding_config_changed + not llm_index_exists() or embedding_config_changed ) if rebuild_needed: