mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
fix https://github.com/langchain-ai/langchain/issues/15384
This commit is contained in:
parent
1678d6ca17
commit
07d294b5ec
@ -44,7 +44,9 @@ class BingSearchAPIWrapper(BaseModel):
|
||||
)
|
||||
response.raise_for_status()
|
||||
search_results = response.json()
|
||||
return search_results["webPages"]["value"]
|
||||
if "webPages" in search_results:
|
||||
return search_results["webPages"]["value"]
|
||||
return []
|
||||
|
||||
@root_validator(pre=True)
|
||||
def validate_environment(cls, values: Dict) -> Dict:
|
||||
|
Loading…
Reference in New Issue
Block a user