mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-19 00:58:32 +00:00
core, community: deprecate tool.__call__ (#20900)
Does not update docs.
This commit is contained in:
@@ -151,7 +151,7 @@ def _load_arxiv_from_universal_entry(**kwargs: Any) -> BaseTool:
|
||||
|
||||
def test_load_arxiv_from_universal_entry() -> None:
|
||||
arxiv_tool = _load_arxiv_from_universal_entry()
|
||||
output = arxiv_tool("Caprice Stanley")
|
||||
output = arxiv_tool.invoke("Caprice Stanley")
|
||||
assert (
|
||||
"On Mixing Behavior of a Family of Random Walks" in output
|
||||
), "failed to fetch a valid result"
|
||||
|
@@ -20,7 +20,7 @@ def ddg_installed() -> bool:
|
||||
def test_ddg_search_tool() -> None:
|
||||
keywords = "Bella Ciao"
|
||||
tool = DuckDuckGoSearchRun()
|
||||
result = tool(keywords)
|
||||
result = tool.invoke(keywords)
|
||||
print(result) # noqa: T201
|
||||
assert len(result.split()) > 20
|
||||
|
||||
@@ -29,6 +29,6 @@ def test_ddg_search_tool() -> None:
|
||||
def test_ddg_search_news_tool() -> None:
|
||||
keywords = "Tesla"
|
||||
tool = DuckDuckGoSearchResults(source="news")
|
||||
result = tool(keywords)
|
||||
result = tool.invoke(keywords)
|
||||
print(result) # noqa: T201
|
||||
assert len(result.split()) > 20
|
||||
|
@@ -147,7 +147,7 @@ def test_load_pupmed_from_universal_entry() -> None:
|
||||
"Examining the Validity of ChatGPT in Identifying "
|
||||
"Relevant Nephrology Literature"
|
||||
)
|
||||
output = pubmed_tool(search_string)
|
||||
output = pubmed_tool.invoke(search_string)
|
||||
test_string = (
|
||||
"Examining the Validity of ChatGPT in Identifying "
|
||||
"Relevant Nephrology Literature: Findings and Implications"
|
||||
|
Reference in New Issue
Block a user