From 63506834e1504df31818b6449b7afa25de6b2223 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 07:34:58 +0000 Subject: [PATCH] fix: address CI failures with types-pytz and CohereEmbedder updates Co-Authored-By: natik@airbyte.io --- airbyte_cdk/destinations/vector_db_based/embedder.py | 8 ++++++-- pyproject.toml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/airbyte_cdk/destinations/vector_db_based/embedder.py b/airbyte_cdk/destinations/vector_db_based/embedder.py index 8e9c6ee71..7ac0582f4 100644 --- a/airbyte_cdk/destinations/vector_db_based/embedder.py +++ b/airbyte_cdk/destinations/vector_db_based/embedder.py @@ -145,9 +145,13 @@ class CohereEmbedder(Embedder): def __init__(self, config: CohereEmbeddingConfigModel): super().__init__() # Client is set internally + from pydantic import SecretStr + self.embeddings = CohereEmbeddings( - cohere_api_key=config.cohere_key, model="embed-english-light-v2.0" - ) # type: ignore + api_key=SecretStr(config.cohere_key), + model="embed-english-light-v2.0", + client_kwargs={"user_agent": "langchain"} + ) def check(self) -> Optional[str]: try: diff --git a/pyproject.toml b/pyproject.toml index b849454f1..d827bdb5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,6 +105,7 @@ types-requests = "^2.32.0.20241016" types-python-dateutil = "^2.9.0.20241003" types-pyyaml = "^6.0.12.20240917" types-cachetools = "^5.5.0.20240820" +types-pytz = "^2024.1.0.20240417" [tool.poetry.extras] file-based = ["avro", "fastavro", "pyarrow", "unstructured", "pdf2image", "pdfminer.six", "unstructured.pytesseract", "pytesseract", "markdown", "python-calamine", "python-snappy", "pi_heif"]