Skip to content

Commit

Permalink
community: Add parameter allow_dangerous_requests to `WebResearchRe…
Browse files Browse the repository at this point in the history
…triever.from_llm` construct (#24712)

**Description:** To avoid ValueError when construct the retriever from
method `from_llm()`.
  • Loading branch information
ddxgz authored Jul 26, 2024
1 parent 5f593c1 commit 190988d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/community/langchain_community/retrievers/web_research.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def from_llm(
chunk_size=1500, chunk_overlap=150
),
trust_env: bool = False,
allow_dangerous_requests: bool = False,
) -> "WebResearchRetriever":
"""Initialize from llm using default template.
Expand Down Expand Up @@ -162,6 +163,7 @@ def from_llm(
num_search_results=num_search_results,
text_splitter=text_splitter,
trust_env=trust_env,
allow_dangerous_requests=allow_dangerous_requests,
)

def clean_search_query(self, query: str) -> str:
Expand Down

0 comments on commit 190988d

Please sign in to comment.