The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: fix Google Scholar tool errors (#29371)
Terry Tanec0ebb76f22f
diff --git a/libs/community/langchain_community/utilities/google_scholar.py b/libs/community/langchain_community/utilities/google_scholar.pyindex ffc94848a6..6dd966921a 100644--- a/libs/community/langchain_community/utilities/google_scholar.py+++ b/libs/community/langchain_community/utilities/google_scholar.py@@ -45,6 +45,7 @@ class GoogleScholarAPIWrapper(BaseModel):hl: str = "en"lr: str = "lang_en"serp_api_key: Optional[str] = None+ google_scholar_engine: Any = Nonemodel_config = ConfigDict(extra="forbid",@@ -55,7 +56,7 @@ class GoogleScholarAPIWrapper(BaseModel):def validate_environment(cls, values: Dict) -> Any:"""Validate that api key and python package exists in environment."""serp_api_key = get_from_dict_or_env(values, "serp_api_key", "SERP_API_KEY")- values["SERP_API_KEY"] = serp_api_key+ values["serp_api_key"] = serp_api_keytry:from serpapi import GoogleScholarSearch