Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin committed Feb 26, 2024
1 parent 74bad9d commit 6c60642
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import uuid
import warnings
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, Type, Union
from typing import Any, Iterable, List, Optional, Tuple, Type, Union

from google.cloud.aiplatform.matching_engine.matching_engine_index_endpoint import (
Namespace,
Expand All @@ -19,9 +19,6 @@
Searcher,
)

if TYPE_CHECKING:
from langchain_community.embeddings import TensorflowHubEmbeddings


class _BaseVertexAIVectorStore(VectorStore):
"""Represents a base vector store based on VertexAI."""
Expand Down Expand Up @@ -189,7 +186,7 @@ def from_texts(
)

@classmethod
def _get_default_embeddings(cls) -> "TensorflowHubEmbeddings":
def _get_default_embeddings(cls) -> Embeddings:
"""This function returns the default embedding.
Returns:
Default TensorflowHubEmbeddings to use.
Expand All @@ -205,12 +202,9 @@ def _get_default_embeddings(cls) -> "TensorflowHubEmbeddings":
)

# TODO: Change to vertexai embbedingss
from langchain_community import embeddings

from langchain_community.embeddings import (
TensorflowHubEmbeddings, # type: ignore
)

return TensorflowHubEmbeddings()
return embeddings.TensorflowHubEmbeddings()

def _generate_unique_ids(self, number: int) -> List[str]:
"""Generates a list of unique ids of length `number`
Expand Down

0 comments on commit 6c60642

Please sign in to comment.