RedditSearchSchema#

class langchain_community.tools.reddit_search.tool.RedditSearchSchema[source]#

Bases: BaseModel

Input for Reddit search.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param limit: str [Required]#

a positive integer indicating the maximum number of results to return

param query: str [Required]#

should be query string that post title should contain, or ‘*’ if anything is allowed.

param sort: str [Required]#

should be sort method, which is one of: “relevance” , “hot”, “top”, “new”, or “comments”.

param subreddit: str [Required]#

should be name of subreddit, like “all” for r/all

param time_filter: str [Required]#

should be time period to filter by, which is one of “all”, “day”, “hour”, “month”, “week”, or “year”

Examples using RedditSearchSchema