类 WebSearchTool

java.lang.Object
dev.langchain4j.web.search.WebSearchTool

public class WebSearchTool extends Object
  • 构造器详细资料

  • 方法详细资料

    • searchWeb

      public String searchWeb(String query)
      Runs a search query on the web search engine and returns a pretty-string representation of the search results.
      参数:
      query - the search user query
      返回:
      a pretty-string representation of the search results
    • from

      public static WebSearchTool from(WebSearchEngine searchEngine)
      Creates a new WebSearchTool with the specified web search engine.
      参数:
      searchEngine - the web search engine to use for searching the web
      返回:
      a new WebSearchTool