diff --git a/docs/extras/modules/data_connection/retrievers/web_research.ipynb b/docs/extras/modules/data_connection/retrievers/web_research.ipynb index 43c38010f0bb5..9f929f84223bc 100644 --- a/docs/extras/modules/data_connection/retrievers/web_research.ipynb +++ b/docs/extras/modules/data_connection/retrievers/web_research.ipynb @@ -55,8 +55,8 @@ "llm = ChatOpenAI(temperature=0)\n", "\n", "# Search \n", - "os.environ[\"GOOGLE_CSE_ID\"] = \"d41ce8cb756bc4829\"\n", - "os.environ[\"GOOGLE_API_KEY\"] = \"AIzaSyAjHlH_JsmmigyomF0qykkFtJldEIFNvUs\"\n", + "os.environ[\"GOOGLE_CSE_ID\"] = \"xxx\"\n", + "os.environ[\"GOOGLE_API_KEY\"] = \"xxx\"\n", "search = GoogleSearchAPIWrapper()" ] }, diff --git a/libs/langchain/langchain/retrievers/web_research.py b/libs/langchain/langchain/retrievers/web_research.py index a60128b21b519..675347f20c895 100644 --- a/libs/langchain/langchain/retrievers/web_research.py +++ b/libs/langchain/langchain/retrievers/web_research.py @@ -15,7 +15,7 @@ from langchain.llms import LlamaCpp from langchain.llms.base import BaseLLM from langchain.output_parsers.pydantic import PydanticOutputParser -from langchain.prompts import PromptTemplate +from langchain.prompts import BasePromptTemplate, PromptTemplate from langchain.schema import BaseRetriever, Document from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.utilities import GoogleSearchAPIWrapper @@ -92,7 +92,7 @@ def from_llm( vectorstore: VectorStore, llm: BaseLLM, search: GoogleSearchAPIWrapper, - prompt: Optional[PromptTemplate] = None, + prompt: Optional[BasePromptTemplate] = None, max_splits_per_doc: int = 100, num_search_results: int = 1, text_splitter: RecursiveCharacterTextSplitter = RecursiveCharacterTextSplitter(