mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 03:52:10 +00:00
community[patch]: Fix missing protected_namespaces(). (#27610)
- [x] **PR message**: - **Description:** Fixes warning messages raised due to missing `protected_namespaces` parameter in `ConfigDict`. - **Issue:** https://github.com/langchain-ai/langchain/issues/27609 - **Dependencies:** No dependencies - **Twitter handle:** @gawbul
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from langchain_core.utils import get_from_dict_or_env, pre_init
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from tenacity import (
|
||||
before_sleep_log,
|
||||
retry,
|
||||
@@ -62,6 +62,8 @@ class GooglePalmEmbeddings(BaseModel, Embeddings):
|
||||
show_progress_bar: bool = False
|
||||
"""Whether to show a tqdm progress bar. Must have `tqdm` installed."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
@pre_init
|
||||
def validate_environment(cls, values: Dict) -> Dict:
|
||||
"""Validate api key, python package exists."""
|
||||
|
Reference in New Issue
Block a user