community[patch]: Update root_validators embeddings: llamacpp, jina, dashscope, mosaicml, huggingface_hub, Toolkits: Connery, ChatModels: PAI_EAS, (#22828)

This PR updates root validators for:

* Embeddings: llamacpp, jina, dashscope, mosaicml, huggingface_hub
* Toolkits: Connery
* ChatModels: PAI_EAS

Following this issue:
https://github.com/langchain-ai/langchain/issues/22819
This commit is contained in:
Eugene Yurtsev
2024-06-12 13:59:05 -04:00
committed by GitHub
parent 32ba8cfab0
commit 265e650e64
7 changed files with 22 additions and 17 deletions

View File

@@ -46,7 +46,7 @@ class MosaicMLInstructorEmbeddings(BaseModel, Embeddings):
extra = Extra.forbid
@root_validator()
@root_validator(pre=True)
def validate_environment(cls, values: Dict) -> Dict:
"""Validate that api key and python package exists in environment."""
mosaicml_api_token = get_from_dict_or_env(