BraveSearch()Tool that queries the BraveSearch.
Api key can be provided as an environment variable BRAVE_SEARCH_API_KEY or as a parameter.
Example usages: .. code-block:: python # uses BRAVE_SEARCH_API_KEY from environment tool = BraveSearch()
.. code-block:: python # uses the provided api key tool = BraveSearch.from_api_key("your-api-key")
.. code-block:: python # uses the provided api key and search kwargs tool = BraveSearch.from_api_key( api_key = "your-api-key", search_kwargs={"max_results": 5} )
.. code-block:: python # uses BRAVE_SEARCH_API_KEY from environment tool = BraveSearch.from_search_kwargs({"max_results": 5})