Class LangChain4jWebSearchConfiguration

java.lang.Object
org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchConfiguration
All Implemented Interfaces:
Cloneable

@Configurer @UriParams public class LangChain4jWebSearchConfiguration extends Object implements Cloneable
  • Constructor Details

    • LangChain4jWebSearchConfiguration

      public LangChain4jWebSearchConfiguration()
  • Method Details

    • getWebSearchEngine

      public dev.langchain4j.web.search.WebSearchEngine getWebSearchEngine()
    • setWebSearchEngine

      public void setWebSearchEngine(dev.langchain4j.web.search.WebSearchEngine webSearchEngine)
      The WebSearchEngine engine to use. This is mandatory. Use one of the implementations from Langchain4j web search engines.
    • getResultType

      public LangChain4jWebSearchResultType getResultType()
    • setResultType

      public void setResultType(LangChain4jWebSearchResultType resultType)
      The resultType is the result type of the request. Valid values are LANGCHAIN4J_WEB_SEARCH_ORGANIC_RESULT, CONTENT, or SNIPPET. CONTENT is the default value; it will return a list of String . You can also specify to return either the Langchain4j Web Search Organic Result object (using `LANGCHAIN4J_WEB_SEARCH_ORGANIC_RESULT`) or snippet (using `SNIPPET`) for each result. If maxResults is equal to 1, the response will be a single object instead of a list.
    • getMaxResults

      public Integer getMaxResults()
      The maxResults is the expected number of results to be found if the search request were made. Each search engine may have a different limit for the maximum number of results that can be returned.
      Returns:
    • setMaxResults

      public void setMaxResults(Integer maxResults)
    • getLanguage

      public String getLanguage()
      The language is the desired language for search results. The expected values may vary depending on the search engine.
      Returns:
    • setLanguage

      public void setLanguage(String language)
    • getGeoLocation

      public String getGeoLocation()
    • setGeoLocation

      public void setGeoLocation(String geoLocation)
      The geoLocation is the desired geolocation for search results. Each search engine may have a different set of supported geolocations.
    • getStartPage

      public Integer getStartPage()
    • setStartPage

      public void setStartPage(Integer startPage)
      The startPage is the start page number for search results
    • getStartIndex

      public Integer getStartIndex()
    • setStartIndex

      public void setStartIndex(Integer startIndex)
      The startIndex is the start index for search results, which may vary depending on the search engine.
    • getSafeSearch

      public Boolean getSafeSearch()
    • setSafeSearch

      public void setSafeSearch(Boolean safeSearch)
      The safeSearch is the safe search flag, indicating whether to enable or disable safe search.
    • getAdditionalParams

      public Map<String,Object> getAdditionalParams()
    • setAdditionalParams

      public void setAdditionalParams(Map<String,Object> additionalParams)
      The additionalParams is the additional parameters for the search request are a map of key-value pairs that represent additional parameters for the search request.
    • getWebSearchRequest

      public dev.langchain4j.web.search.WebSearchRequest getWebSearchRequest()
    • setWebSearchRequest

      public void setWebSearchRequest(dev.langchain4j.web.search.WebSearchRequest webSearchRequest)
      The webSearchRequest is the custom WebSearchRequest - advanced
    • copy