Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Apr 24, 2024
1 parent 62dc24d commit 22cfb1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libs/community/langchain_community/retrievers/web_research.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def parse(self, text: str) -> List[str]:
from langchain.chains import LLMChain
from langchain.chains.prompt_selector import ConditionalPromptSelector

DEFAULT_TEXT_SPLITTER = RecursiveCharacterTextSplitter(
chunk_size=1500, chunk_overlap=150
)

class WebResearchRetriever(BaseRetriever):
"""`Google Search API` retriever."""

Expand Down Expand Up @@ -90,9 +94,7 @@ def from_llm(
search: GoogleSearchAPIWrapper,
prompt: Optional[BasePromptTemplate] = None,
num_search_results: int = 1,
text_splitter: RecursiveCharacterTextSplitter = RecursiveCharacterTextSplitter(
chunk_size=1500, chunk_overlap=150
),
text_splitter: RecursiveCharacterTextSplitter = DEFAULT_TEXT_SPLITTER,
) -> "WebResearchRetriever":
"""Initialize from llm using default template.
Expand Down

0 comments on commit 22cfb1e

Please sign in to comment.