From ea87cd47bd5e3f1b3f513c8c55073c4179ade5ea Mon Sep 17 00:00:00 2001 From: EugeneLightsOn <144219719+EugeneLightsOn@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:00:04 +0200 Subject: [PATCH] Fix Cohere Embeddings issue #11820 (#11822) --- .../llama_index/embeddings/cohere/base.py | 4 ++-- .../embeddings/llama-index-embeddings-cohere/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llama-index-integrations/embeddings/llama-index-embeddings-cohere/llama_index/embeddings/cohere/base.py b/llama-index-integrations/embeddings/llama-index-embeddings-cohere/llama_index/embeddings/cohere/base.py index 026de4d22..5dbe42feb 100644 --- a/llama-index-integrations/embeddings/llama-index-embeddings-cohere/llama_index/embeddings/cohere/base.py +++ b/llama-index-integrations/embeddings/llama-index-embeddings-cohere/llama_index/embeddings/cohere/base.py @@ -164,7 +164,7 @@ class CohereEmbedding(BaseEmbedding): async def _aget_query_embedding(self, query: str) -> List[float]: """Get query embedding async. For query embeddings, input_type='search_query'.""" - return self._get_query_embedding(query, input_type="search_query") + return self._get_query_embedding(query) def _get_text_embedding(self, text: str) -> List[float]: """Get text embedding.""" @@ -172,7 +172,7 @@ class CohereEmbedding(BaseEmbedding): async def _aget_text_embedding(self, text: str) -> List[float]: """Get text embedding async.""" - return self._get_text_embedding(text, input_type="search_document") + return self._get_text_embedding(text) def _get_text_embeddings(self, texts: List[str]) -> List[List[float]]: """Get text embeddings.""" diff --git a/llama-index-integrations/embeddings/llama-index-embeddings-cohere/pyproject.toml b/llama-index-integrations/embeddings/llama-index-embeddings-cohere/pyproject.toml index f4f04c0f2..e3829f03b 100644 --- a/llama-index-integrations/embeddings/llama-index-embeddings-cohere/pyproject.toml +++ b/llama-index-integrations/embeddings/llama-index-embeddings-cohere/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-embeddings-cohere" readme = "README.md" -version = "0.1.3" +version = "0.1.4" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" -- GitLab