mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
## Description Support search params in GoogleSearchApiWrapper's result call, for the extra filtering on search, to support extra query parameters that google cse provides: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list?hl=ko ## Issue #6810
This commit is contained in:
@@ -17,3 +17,14 @@ def test_no_result_call() -> None:
|
||||
)
|
||||
print(type(output))
|
||||
assert "No good Google Search Result was found" == output
|
||||
|
||||
|
||||
def test_result_with_params_call() -> None:
|
||||
"""Test that call gives the correct answer with extra params."""
|
||||
search = GoogleSearchAPIWrapper()
|
||||
output = search.results(
|
||||
query="What was Obama's first name?",
|
||||
num_results=5,
|
||||
search_params={"cr": "us", "safe": "active"},
|
||||
)
|
||||
assert len(output)
|
||||
|
Reference in New Issue
Block a user