From b0b302ec6b3ace426c18591eb391f8aac99010ea Mon Sep 17 00:00:00 2001 From: Jens <12241017+zwischenraum@users.noreply.github.com> Date: Tue, 21 May 2024 00:39:43 +0200 Subject: [PATCH] community[patch]: fixed aleph alpha default emedding request (#21826) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **Description:** In the aleph alpha client the paramater `normalize` is *not* optional. Setting this to `None` gives an error. - **Dependencies:** None Co-authored-by: Jens Lücke Co-authored-by: Jens Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> --- libs/community/langchain_community/embeddings/aleph_alpha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/embeddings/aleph_alpha.py b/libs/community/langchain_community/embeddings/aleph_alpha.py index 7e61ce31d58..f2d78756573 100644 --- a/libs/community/langchain_community/embeddings/aleph_alpha.py +++ b/libs/community/langchain_community/embeddings/aleph_alpha.py @@ -37,7 +37,7 @@ class AlephAlphaAsymmetricSemanticEmbedding(BaseModel, Embeddings): compress_to_size: Optional[int] = None """Should the returned embeddings come back as an original 5120-dim vector, or should it be compressed to 128-dim.""" - normalize: Optional[bool] = None + normalize: bool = False """Should returned embeddings be normalized""" contextual_control_threshold: Optional[int] = None """Attention control parameters only apply to those tokens that have