langchain_community.document_loaders.youtube
.GoogleApiClient¶
- class langchain_community.document_loaders.youtube.GoogleApiClient(credentials_path: Path = PosixPath('/Users/cw/.credentials/credentials.json'), service_account_path: Path = PosixPath('/Users/cw/.credentials/credentials.json'), token_path: Path = PosixPath('/Users/cw/.credentials/token.json'))[source]¶
通用的Google API客户端。
要使用,您应该安装``google_auth_oauthlib, youtube_transcript_api, google`` python包。 由于google api需要凭据,您需要设置一个google账户并注册您的服务。”https://developers.google.com/docs/api/quickstart/python”
- 示例:
from langchain_community.document_loaders import GoogleApiClient google_api_client = GoogleApiClient( service_account_path=Path("path_to_your_sec_file.json") )
Attributes
credentials_path
service_account_path
token_path
Methods
__init__
([credentials_path, ...])验证folder_id或document_ids中的一个已设置,但不能同时设置两者。
- Parameters
credentials_path (Path) –
service_account_path (Path) –
token_path (Path) –
- Return type
None
- __init__(credentials_path: Path = PosixPath('/Users/cw/.credentials/credentials.json'), service_account_path: Path = PosixPath('/Users/cw/.credentials/credentials.json'), token_path: Path = PosixPath('/Users/cw/.credentials/token.json')) None ¶
- Parameters
credentials_path (Path) –
service_account_path (Path) –
token_path (Path) –
- Return type
None