Initialize from llm using default template.
from_llm(
cls,
vectorstore: VectorStore,
llm: BaseLLM,
search: GoogleSearchAPIWrapper,
prompt: Optional[BasePromptTemplate] = None,
num_search_results: int = 1,
text_splitter: RecursiveCharacterTextSplitter = RecursiveCharacterTextSplitter(chunk_size=1500, chunk_overlap=150),
trust_env: bool = False,
allow_dangerous_requests: bool = False
) -> WebResearchRetriever| Name | Type | Description |
|---|---|---|
vectorstore* | VectorStore | Vector store for storing web pages |
llm* | BaseLLM | llm for search question generation |
search* | GoogleSearchAPIWrapper | GoogleSearchAPIWrapper |
prompt | Optional[BasePromptTemplate] | Default: Noneprompt to generating search questions |
num_search_results | int | Default: 1Number of pages per Google search |
text_splitter | RecursiveCharacterTextSplitter | Default: RecursiveCharacterTextSplitter(chunk_size=1500, chunk_overlap=150)Text splitter for splitting web pages into chunks |
trust_env | bool | Default: FalseWhether to use the http_proxy/https_proxy env variables or check .netrc for proxy configuration |
allow_dangerous_requests | bool | Default: FalseA flag to force users to acknowledge the risks of SSRF attacks when using this retriever |