The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: add model_name param valid for GPT4AllEmbeddings (#23867)
wenngongb1e90b3075a4
diff --git a/libs/community/langchain_community/embeddings/gpt4all.py b/libs/community/langchain_community/embeddings/gpt4all.pyindex 87c0bdca4b..1c6b650189 100644--- a/libs/community/langchain_community/embeddings/gpt4all.py+++ b/libs/community/langchain_community/embeddings/gpt4all.py@@ -22,21 +22,20 @@ class GPT4AllEmbeddings(BaseModel, Embeddings):)"""- model_name: str+ model_name: Optional[str] = Nonen_threads: Optional[int] = Nonedevice: Optional[str] = "cpu"gpt4all_kwargs: Optional[dict] = {}client: Any #: :meta private:- @root_validator()+ @root_validator(pre=True)def validate_environment(cls, values: Dict) -> Dict:"""Validate that GPT4All library is installed."""-try:from gpt4all import Embed4Allvalues["client"] = Embed4All(- model_name=values["model_name"],+ model_name=values.get("model_name"),n_threads=values.get("n_threads"),device=values.get("device"),**values.get("gpt4all_kwargs"),