langchain/libs/partners/exa/tests/integration_tests/test_search_tool.py

9 lines
271 B
Python
Raw Normal View History

2024-01-25 03:57:17 +00:00
from langchain_exa import ExaSearchResults
def test_search_tool() -> None:
tool = ExaSearchResults()
res = tool.invoke({"query": "best time to visit japan", "num_results": 5})
print(res)
assert not isinstance(res, str) # str means error for this tool\