Package dev.langchain4j.web.search
Class WebSearchRequest.Builder
java.lang.Object
dev.langchain4j.web.search.WebSearchRequest.Builder
- Enclosing class:
WebSearchRequest
-
Method Summary
Modifier and TypeMethodDescriptionadditionalParams
(Map<String, Object> additionalParams) Set the additional parameters for the search request.build()
Build the web search request.geoLocation
(String geoLocation) Set the desired geolocation for search results.Set the desired language for search results.maxResults
(Integer maxResults) Set the maximum number of results.safeSearch
(Boolean safeSearch) Set the safe search flag.searchTerms
(String searchTerms) Set the search terms.startIndex
(Integer startIndex) Set the start index for search results.Set the start page number for search results.
-
Method Details
-
searchTerms
Set the search terms.- Parameters:
searchTerms
- The keyword or keywords desired by the search user.- Returns:
- The builder instance.
-
maxResults
Set the maximum number of results.- Parameters:
maxResults
- The maximum number of results.- Returns:
- The builder instance.
-
language
Set the desired language for search results.- Parameters:
language
- The desired language for search results.- Returns:
- The builder instance.
-
geoLocation
Set the desired geolocation for search results.- Parameters:
geoLocation
- The desired geolocation for search results.- Returns:
- The builder instance.
-
startPage
Set the start page number for search results.- Parameters:
startPage
- The start page number for search results.- Returns:
- The builder instance.
-
startIndex
Set the start index for search results.- Parameters:
startIndex
- The start index for search results.- Returns:
- The builder instance.
-
safeSearch
Set the safe search flag.- Parameters:
safeSearch
- The safe search flag.- Returns:
- The builder instance.
-
additionalParams
Set the additional parameters for the search request.- Parameters:
additionalParams
- The additional parameters for the search request.- Returns:
- The builder instance.
-
build
Build the web search request.- Returns:
- The web search request.
-