Skip to content

Commit

Permalink
Silence lint error in embeddings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Feb 26, 2024
1 parent 6d1d450 commit 4372a15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/vertexai/langchain_google_vertexai/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate_environment(cls, values: Dict) -> Dict:
"textembedding-gecko@001"
)
values["model_name"] = "textembedding-gecko@001"
_, user_agent = get_user_agent(f"{cls.__name__}_{values['model_name']}")
_, user_agent = get_user_agent(f"{cls.__name__}_{values['model_name']}") # type: ignore
with tool_context_manager(user_agent):
values["client"] = TextEmbeddingModel.from_pretrained(values["model_name"])
return values
Expand Down Expand Up @@ -83,9 +83,9 @@ def __init__(
self.instance["task_executor"] = ThreadPoolExecutor(
max_workers=request_parallelism
)
self.instance[
"embeddings_task_type_supported"
] = not self.client._endpoint_name.endswith("/textembedding-gecko@001")
self.instance["embeddings_task_type_supported"] = (
not self.client._endpoint_name.endswith("/textembedding-gecko@001")
)

@staticmethod
def _split_by_punctuation(text: str) -> List[str]:
Expand Down

0 comments on commit 4372a15

Please sign in to comment.