openai[patch]: set protected namespaces on embeddings (#26155)

This commit is contained in:
ccurme
2024-09-06 13:00:41 -04:00
committed by GitHub
parent b74546a458
commit 1b77063c88

View File

@@ -264,7 +264,9 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
"""Whether to check the token length of inputs and automatically split inputs
longer than embedding_ctx_length."""
model_config = ConfigDict(extra="forbid", populate_by_name=True)
model_config = ConfigDict(
extra="forbid", populate_by_name=True, protected_namespaces=()
)
@model_validator(mode="before")
@classmethod