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