Skip to content

Commit 6350683

Browse files
fix: address CI failures with types-pytz and CohereEmbedder updates
Co-Authored-By: [email protected] <[email protected]>
1 parent 42d831a commit 6350683

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

airbyte_cdk/destinations/vector_db_based/embedder.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,13 @@ class CohereEmbedder(Embedder):
145145
def __init__(self, config: CohereEmbeddingConfigModel):
146146
super().__init__()
147147
# Client is set internally
148+
from pydantic import SecretStr
149+
148150
self.embeddings = CohereEmbeddings(
149-
cohere_api_key=config.cohere_key, model="embed-english-light-v2.0"
150-
) # type: ignore
151+
api_key=SecretStr(config.cohere_key),
152+
model="embed-english-light-v2.0",
153+
client_kwargs={"user_agent": "langchain"}
154+
)
151155

152156
def check(self) -> Optional[str]:
153157
try:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ types-requests = "^2.32.0.20241016"
105105
types-python-dateutil = "^2.9.0.20241003"
106106
types-pyyaml = "^6.0.12.20240917"
107107
types-cachetools = "^5.5.0.20240820"
108+
types-pytz = "^2024.1.0.20240417"
108109

109110
[tool.poetry.extras]
110111
file-based = ["avro", "fastavro", "pyarrow", "unstructured", "pdf2image", "pdfminer.six", "unstructured.pytesseract", "pytesseract", "markdown", "python-calamine", "python-snappy", "pi_heif"]

0 commit comments

Comments
 (0)