Package dev.langchain4j.web.search
Class WebSearchTool
java.lang.Object
dev.langchain4j.web.search.WebSearchTool
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebSearchTool
from
(WebSearchEngine searchEngine) Creates a new WebSearchTool with the specified web search engine.Runs a search query on the web search engine and returns a pretty-string representation of the search results.
-
Constructor Details
-
WebSearchTool
-
-
Method Details
-
searchWeb
Runs a search query on the web search engine and returns a pretty-string representation of the search results.- Parameters:
query
- the search user query- Returns:
- a pretty-string representation of the search results
-
from
Creates a new WebSearchTool with the specified web search engine.- Parameters:
searchEngine
- the web search engine to use for searching the web- Returns:
- a new WebSearchTool
-