diff --git a/backend/model_server/encoders.py b/backend/model_server/encoders.py index 0db4aa38e..3d714a94a 100644 --- a/backend/model_server/encoders.py +++ b/backend/model_server/encoders.py @@ -97,6 +97,7 @@ class CloudEmbedding: texts=texts, model=model, input_type=embedding_type, + truncate="NONE", ) return response.embeddings @@ -126,6 +127,7 @@ class CloudEmbedding: ) return [embedding.values for embedding in embeddings] + @retry(tries=_RETRY_TRIES, delay=_RETRY_DELAY) def embed( self, *, @@ -211,7 +213,6 @@ def warm_up_cross_encoders() -> None: @simple_log_function_time() -@retry(tries=_RETRY_TRIES, delay=_RETRY_DELAY) def embed_text( texts: list[str], text_type: EmbedTextType, diff --git a/backend/requirements/model_server.txt b/backend/requirements/model_server.txt index e78f292fa..19cbfcc62 100644 --- a/backend/requirements/model_server.txt +++ b/backend/requirements/model_server.txt @@ -10,5 +10,5 @@ transformers==4.39.2 uvicorn==0.21.1 voyageai==0.2.3 openai==1.14.3 -cohere==5.5.8 -google-cloud-aiplatform==1.58.0 \ No newline at end of file +cohere==5.6.1 +google-cloud-aiplatform==1.58.0