Skip to content

Commit

Permalink
feat: support for shopping search in SerpApi (#5259)
Browse files Browse the repository at this point in the history
# Support for shopping search in SerpApi

## Who can review?
@vowelparrot
  • Loading branch information
aymenfurter authored May 28, 2023
1 parent 1daa706 commit e274295
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions langchain/utilities/serpapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ def _process_response(res: dict) -> str:
and "game_spotlight" in res["sports_results"].keys()
):
toret = res["sports_results"]["game_spotlight"]
elif (
"shopping_results" in res.keys()
and "title" in res["shopping_results"][0].keys()
):
toret = res["shopping_results"][:3]
elif (
"knowledge_graph" in res.keys()
and "description" in res["knowledge_graph"].keys()
Expand Down

0 comments on commit e274295

Please sign in to comment.