diff --git a/libs/community/langchain_google_community/bq_storage_vectorstores/bigquery.py b/libs/community/langchain_google_community/bq_storage_vectorstores/bigquery.py index 00045e15..4fbd8d3a 100644 --- a/libs/community/langchain_google_community/bq_storage_vectorstores/bigquery.py +++ b/libs/community/langchain_google_community/bq_storage_vectorstores/bigquery.py @@ -136,6 +136,9 @@ def initialize_bq_vector_index(cls, values: dict) -> dict: values["_logger"].debug("Not enough rows to create a vector index.") return values + if "_last_index_check" not in values: + values["_last_index_check"] = datetime.min + if datetime.utcnow() - values["_last_index_check"] < INDEX_CHECK_INTERVAL: return values