mirror of
https://github.com/hwchase17/langchain
synced 2024-11-18 09:25:54 +00:00
feat: support for shopping search in SerpApi (#5259)
# Support for shopping search in SerpApi ## Who can review? @vowelparrot
This commit is contained in:
parent
1daa7068b2
commit
e2742953a6
@ -143,6 +143,11 @@ class SerpAPIWrapper(BaseModel):
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user