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][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 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