类 WebSearchInformationResult
java.lang.Object
dev.langchain4j.web.search.WebSearchInformationResult
Represents general information about the web search performed.
This includes the total number of results, the page number, and metadata.
The total number of results is the total number of web pages that are found by the search engine in response to a search query. The page number is the current page number of the search results. The metadata is a map of key-value pairs that provide additional information about the search. For example, it could include the search query, the search engine used, the time it took to perform the search, etc.
-
构造器概要
构造器构造器说明WebSearchInformationResult(Long totalResults) Constructs a new WebSearchInformationResult with the specified total results.Constructs a new WebSearchInformationResult with the specified total results, page number, and metadata. -
方法概要
修饰符和类型方法说明booleanstatic WebSearchInformationResultCreates a new WebSearchInformationResult with the specified total results.static WebSearchInformationResultCreates a new WebSearchInformationResult with the specified total results, page number, and metadata.inthashCode()metadata()Gets the metadata.Gets the page number.toString()Gets the total number of results.
-
构造器详细资料
-
WebSearchInformationResult
Constructs a new WebSearchInformationResult with the specified total results.- 参数:
totalResults- The total number of results.
-
WebSearchInformationResult
public WebSearchInformationResult(Long totalResults, Integer pageNumber, Map<String, Object> metadata) Constructs a new WebSearchInformationResult with the specified total results, page number, and metadata.- 参数:
totalResults- The total number of results.pageNumber- The page number.metadata- The metadata.
-
-
方法详细资料
-
totalResults
Gets the total number of results.- 返回:
- The total number of results.
-
pageNumber
Gets the page number.- 返回:
- The page number.
-
metadata
Gets the metadata.- 返回:
- The metadata.
-
equals
-
hashCode
public int hashCode() -
toString
-
from
Creates a new WebSearchInformationResult with the specified total results.- 参数:
totalResults- The total number of results.- 返回:
- The new WebSearchInformationResult.
-
from
public static WebSearchInformationResult from(Long totalResults, Integer pageNumber, Map<String, Object> metadata) Creates a new WebSearchInformationResult with the specified total results, page number, and metadata.- 参数:
totalResults- The total number of results.pageNumber- The page number.metadata- The metadata.- 返回:
- The new WebSearchInformationResult.
-