From 7ad42590b4e2a8c4ace5471c992b0975a05e290a Mon Sep 17 00:00:00 2001 From: Chester Curme Date: Wed, 4 Sep 2024 14:39:30 -0400 Subject: [PATCH] suppress warnings from protected namespaces on embeddings --- .../huggingface/langchain_huggingface/embeddings/huggingface.py | 1 + .../langchain_huggingface/embeddings/huggingface_endpoint.py | 1 + 2 files changed, 2 insertions(+) diff --git a/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface.py b/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface.py index 6b99142de3ef9..31fd81921433f 100644 --- a/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface.py +++ b/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface.py @@ -64,6 +64,7 @@ def __init__(self, **kwargs: Any): model_config = ConfigDict( extra="forbid", + protected_namespaces=(), ) def embed_documents(self, texts: List[str]) -> List[List[float]]: diff --git a/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface_endpoint.py b/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface_endpoint.py index fa6412da09202..3986e192e1fc6 100644 --- a/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface_endpoint.py +++ b/libs/partners/huggingface/langchain_huggingface/embeddings/huggingface_endpoint.py @@ -47,6 +47,7 @@ class HuggingFaceEndpointEmbeddings(BaseModel, Embeddings): model_config = ConfigDict( extra="forbid", + protected_namespaces=(), ) @model_validator(mode="after")