SearchInput#

class langchain_community.tools.asknews.tool.SearchInput[source]#

Bases: BaseModel

Input for the AskNews Search tool.

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 hours_back: int | None = 0#

If the Assistant deems that the event may have occurred more than 48 hours ago, it estimates the number of hours back to search. For example, if the event was one month ago, the Assistant may set this to 720. One week would be 168. The Assistant can estimate up to on year back (8760).

param query: str [Required]#

Search query to be used for finding real-time or historical news information.