mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 14:36:54 +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:
@@ -2,7 +2,7 @@ import os
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from pydantic import BaseModel, model_validator
|
||||
from pydantic import BaseModel, ConfigDict, model_validator
|
||||
|
||||
|
||||
class AscendEmbeddings(Embeddings, BaseModel):
|
||||
@@ -33,6 +33,8 @@ class AscendEmbeddings(Embeddings, BaseModel):
|
||||
model: Any
|
||||
tokenizer: Any
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
try:
|
||||
|
Reference in New Issue
Block a user