The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: Fix for Pydantic model validator of GoogleApiClient (#29346)
Bhav Sardanad6a7aaa97de1
diff --git a/libs/community/langchain_community/document_loaders/youtube.py b/libs/community/langchain_community/document_loaders/youtube.pyindex 67c1569adf..64871eb3ca 100644--- a/libs/community/langchain_community/document_loaders/youtube.py+++ b/libs/community/langchain_community/document_loaders/youtube.py@@ -52,14 +52,14 @@ class GoogleApiClient:@model_validator(mode="before")@classmethod- def validate_channel_or_videoIds_is_set(cls, values: Dict[str, Any]) -> Any:+ def validate_channel_or_videoIds_is_set(cls, values: Any) -> Any:"""Validate that either folder_id or document_ids is set, but not both."""- if not values.get("credentials_path") and not values.get(+ if not values.kwargs.get("credentials_path") and not values.kwargs.get("service_account_path"):raise ValueError("Must specify either channel_name or video_ids")- return values+ return values.kwargsdef _load_credentials(self) -> Any:"""Load credentials."""