From 506eff86946ab522f4de2d764373ad5506b1af70 Mon Sep 17 00:00:00 2001 From: Lu Peng <118394507+lu-ohai@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:11:07 -0500 Subject: [PATCH] Update oci_data_science_model_deployment_endpoint.py --- .../oci_data_science_model_deployment_endpoint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/community/langchain_community/embeddings/oci_data_science_model_deployment_endpoint.py b/libs/community/langchain_community/embeddings/oci_data_science_model_deployment_endpoint.py index 826550ea2c600..e3fca474f4648 100644 --- a/libs/community/langchain_community/embeddings/oci_data_science_model_deployment_endpoint.py +++ b/libs/community/langchain_community/embeddings/oci_data_science_model_deployment_endpoint.py @@ -1,7 +1,7 @@ from typing import Any, Dict, List, Optional, Mapping, Callable from langchain_core.embeddings import Embeddings -from langchain_core.pydantic_v1 import BaseModel, root_validator, Field -from langchain_core.utils import get_from_dict_or_env +from langchain_core.pydantic_v1 import BaseModel, Field +from langchain_core.utils import get_from_dict_or_env, pre_init from langchain_core.language_models.llms import create_base_retry_decorator import requests @@ -59,7 +59,7 @@ class OCIModelDeploymentEndpointEmbeddings(BaseModel, Embeddings): max_retries: int = 1 """The maximum number of retries to make when generating.""" - @root_validator() + @pre_init def validate_environment( # pylint: disable=no-self-argument cls, values: Dict ) -> Dict: