Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added parsing for Brave Search Output (#779)
Made changes so that a fully typed JSON object is returned by Brave Search . This fixes issue #771 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Parse Brave Search JSON output into `SearchResult` objects and update `BraveSearchOutput` to return a list of these objects. > > - **Behavior**: > - `search()` in `brave.py` now parses JSON results into `SearchResult` objects. > - `BraveSearchOutput` now returns a list of `SearchResult` instead of a single string. > - **Models**: > - Adds `SearchResult` model in `brave.py` with `title`, `link`, and `snippet` fields. > - Updates `BraveSearchOutput` in `brave.py` to use `List[SearchResult]` for `result`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 61e813a. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Diwank Singh Tomer <[email protected]> Co-authored-by: vedantsahai18 <[email protected]>
- Loading branch information