diff --git a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py index edd2014..b8d4b87 100644 --- a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py +++ b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py @@ -494,8 +494,6 @@ def validate_client(self) -> "Model": endpoint="https://ai.api.nvidia.com/v1/retrieval/nvidia/embeddings", aliases=[ "ai-embed-qa-4", - "playground_nvolveqa_40k", - "nvolveqa_40k", ], ), "nvidia/nv-embed-v1": Model( diff --git a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/embeddings.py b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/embeddings.py index dc29d39..bc5c936 100644 --- a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/embeddings.py +++ b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/embeddings.py @@ -1,6 +1,5 @@ """Embeddings Components Derived from NVEModel/Embeddings""" -import warnings from typing import Any, List, Literal, Optional from langchain_core.embeddings import Embeddings @@ -97,16 +96,6 @@ def __init__(self, **kwargs: Any): # same for base_url self.base_url = self._client.base_url - # todo: remove when nvolveqa_40k is removed from MODEL_TABLE - if "model" in kwargs and kwargs["model"] in [ - "playground_nvolveqa_40k", - "nvolveqa_40k", - ]: - warnings.warn( - 'Setting truncate="END" for nvolveqa_40k backward compatibility' - ) - self.truncate = "END" - @property def available_models(self) -> List[Model]: """ diff --git a/libs/ai-endpoints/tests/integration_tests/test_embeddings.py b/libs/ai-endpoints/tests/integration_tests/test_embeddings.py index 998d5ad..e10bfdc 100644 --- a/libs/ai-endpoints/tests/integration_tests/test_embeddings.py +++ b/libs/ai-endpoints/tests/integration_tests/test_embeddings.py @@ -53,8 +53,6 @@ async def test_embed_documents_multiple_async(embedding_model: str, mode: dict) def test_embed_query_long_text(embedding_model: str, mode: dict) -> None: - if embedding_model in ["playground_nvolveqa_40k", "nvolveqa_40k"]: - pytest.skip("Skip test for nvolveqa-40k due to compat override of truncate") embedding = NVIDIAEmbeddings(model=embedding_model, **mode) text = "nvidia " * 10240 with pytest.raises(Exception): @@ -71,8 +69,6 @@ def test_embed_documents_batched_texts(embedding_model: str, mode: dict) -> None def test_embed_documents_mixed_long_texts(embedding_model: str, mode: dict) -> None: - if embedding_model in ["playground_nvolveqa_40k", "nvolveqa_40k"]: - pytest.skip("Skip test for nvolveqa-40k due to compat override of truncate") embedding = NVIDIAEmbeddings(model=embedding_model, **mode) count = _DEFAULT_BATCH_SIZE * 2 - 1 texts = ["nvidia " * 32] * count @@ -101,16 +97,5 @@ def test_embed_documents_truncate( assert len(output) == count -@pytest.mark.parametrize("nvolveqa_40k", ["playground_nvolveqa_40k", "nvolveqa_40k"]) -def test_embed_nvolveqa_40k_compat(nvolveqa_40k: str, mode: dict) -> None: - if mode: - pytest.skip("Test only relevant for API Catalog") - with pytest.warns(UserWarning): - embedding = NVIDIAEmbeddings(model=nvolveqa_40k, truncate="NONE", **mode) - text = "nvidia " * 2048 - output = embedding.embed_query(text) - assert len(output) > 3 - - # todo: test max_length > max length accepted by the model # todo: test max_batch_size > max batch size accepted by the model