RedditSearchAPIWrapper#
- class langchain_community.utilities.reddit_search.RedditSearchAPIWrapper[source]#
Bases:
BaseModel
Wrapper for Reddit API
To use, set the environment variables
REDDIT_CLIENT_ID
,REDDIT_CLIENT_SECRET
,REDDIT_USER_AGENT
to set the client ID, client secret, and user agent, respectively, as given by Redditβs API. Alternatively, all three can be supplied as named parameters in the constructor:reddit_client_id
,reddit_client_secret
, andreddit_user_agent
, respectively.Example
from langchain_community.utilities import RedditSearchAPIWrapper reddit_search = RedditSearchAPIWrapper()
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- param reddit_client: Any [Required]#
- param reddit_client_id: str | None [Required]#
- param reddit_client_secret: str | None [Required]#
- param reddit_user_agent: str | None [Required]#
Examples using RedditSearchAPIWrapper