forked from Archives/langchain
Minor fix for google search util: it's uncertain if "snippet" in results exists (#830)
The results from Google search may not always contain a "snippet". Example: `{'kind': 'customsearch#result', 'title': 'FEMA Flood Map', 'htmlTitle': 'FEMA Flood Map', 'link': 'https://msc.fema.gov/portal/home', 'displayLink': 'msc.fema.gov', 'formattedUrl': 'https://msc.fema.gov/portal/home', 'htmlFormattedUrl': 'https://<b>msc</b>.fema.gov/portal/home'}` This will cause a KeyError at line 99 `snippets.append(result["snippet"])`.harrison/image
parent
b4eb043b81
commit
f3508228df
Loading…
Reference in New Issue