Skip to content

Commit

Permalink
fix type checking (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin authored Jun 25, 2024
1 parent fd7865d commit 3be2c88
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import uuid
from datetime import datetime, timedelta
from threading import Lock, Thread
from typing import Any, Dict, List, Literal, Optional, Type, Union
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Type, Union

from google.api_core.exceptions import ClientError
from google.cloud.bigquery.table import Table
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import root_validator

if TYPE_CHECKING:
from google.cloud.bigquery.table import Table

from langchain_google_community.bq_storage_vectorstores._base import (
BaseBigQueryVectorStore,
)
Expand Down Expand Up @@ -317,7 +319,7 @@ def _create_temp_bq_table(
self,
embeddings: Optional[List[List[float]]],
expire_hours_temp_table: int = 12,
) -> Table:
) -> "Table":
"""Create temporary table to store query embeddings prior to batch search"""
import pandas as pd
from google.cloud import bigquery # type: ignore[attr-defined]
Expand Down

0 comments on commit 3be2c88

Please sign in to comment.