Skip to content

Commit

Permalink
Fix: BigQueryVectorStore crashes on BQ tables with more than 5000 rows (
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfitze authored Jul 18, 2024
1 parent 429f5cf commit 0231d7b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0231d7b

Please sign in to comment.