|
|
@ -74,8 +74,8 @@ class SerpAPIChain(Chain, BaseModel):
|
|
|
|
if serpapi_api_key is None or serpapi_api_key == "":
|
|
|
|
if serpapi_api_key is None or serpapi_api_key == "":
|
|
|
|
raise ValueError(
|
|
|
|
raise ValueError(
|
|
|
|
"Did not find SerpAPI API key, please add an environment variable"
|
|
|
|
"Did not find SerpAPI API key, please add an environment variable"
|
|
|
|
" `SERPAPI_API_KEY` which contains it, or pass `serpapi_api_key` as a named"
|
|
|
|
" `SERPAPI_API_KEY` which contains it, or pass `serpapi_api_key` "
|
|
|
|
" parameter to the constructor."
|
|
|
|
"as a named parameter to the constructor."
|
|
|
|
)
|
|
|
|
)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from serpapi import GoogleSearch
|
|
|
|
from serpapi import GoogleSearch
|
|
|
|