Type Alias TavilySearchAPIRetrieverFields

TavilySearchAPIRetrieverFields: {
    apiBaseUrl?: undefined | string;
    apiWrapper?: undefined | TavilySearchAPIWrapper;
    autoParameters?: undefined | boolean;
    callbacks: undefined | Callbacks;
    chunksPerSource?: undefined | number;
    country?: undefined | string;
    description?: undefined | string;
    excludeDomains?: undefined | string[];
    includeAnswer?: undefined | boolean;
    includeDomains?: undefined | string[];
    includeFavicon?: undefined | boolean;
    includeImageDescriptions?: undefined | boolean;
    includeImages?: undefined | boolean;
    includeRawContent?:
        | undefined
        | boolean
        | "markdown"
        | "text";
    maxResults?: undefined | number;
    metadata: undefined | Record<string, unknown>;
    name?: undefined | string;
    responseFormat: undefined | string;
    returnDirect?: undefined | boolean;
    searchDepth?: undefined | SearchDepth;
    tags: undefined | string[];
    tavilyApiKey?: undefined | string;
    timeRange?: undefined | TimeRange;
    topic?: undefined | TopicType;
    verbose: undefined | boolean;
    verboseParsingErrors: undefined | boolean;
}

Options for the TavilySearchResults tool.

Type declaration

  • OptionalapiBaseUrl?: undefined | string

    The base URL to be used for the Tavily Search API.

  • OptionalapiWrapper?: undefined | TavilySearchAPIWrapper

    An API wrapper that can be used to interact with the Tavily Search API. Useful for testing.

    If specified, the tool will use this API wrapper instead of creating a new one, and fields used in API Wrapper initialization, like TavilySearchAPIRetrieverFields.tavilyApiKey, will be ignored.

  • OptionalautoParameters?: undefined | boolean

    Whether to automatically determine optimal search parameters based on the query. This can only be set during tool instantiation, not at invocation time.

    false
    
  • callbacks: undefined | Callbacks
  • OptionalchunksPerSource?: undefined | number

    The number of content chunks to retrieve from each source. Each chunk's length is maximum 500 characters. Available only when searchDepth is advanced. See https://docs.tavily.com/docs/rest-api/api-reference

    3
    
  • Optionalcountry?: undefined | string

    The country to search in. MUST be the full country name in lowercase like "united states" or "united kingdom".

    undefined
    
  • Optionaldescription?: undefined | string

    The description of the tool.

    "A search engine optimized for comprehensive, accurate, and trusted results. Useful for when you need to answer questions about current events. Input should be a search query."
    
  • OptionalexcludeDomains?: undefined | string[]

    A list of domains to specifically exclude from the search results.

    []
    
  • OptionalincludeAnswer?: undefined | boolean

    Include a short answer to the original query.

    false
    
  • OptionalincludeDomains?: undefined | string[]

    A list of domains to specifically include in the search results.

    []
    
  • OptionalincludeFavicon?: undefined | boolean

    Whether to include the favicon URL for each result.

    false
    
  • OptionalincludeImageDescriptions?: undefined | boolean

    When includeImages is set to True, this option adds descriptive text for each image.

    false
    
  • OptionalincludeImages?: undefined | boolean

    Include a list of query-related images in the response.

    false
    
  • OptionalincludeRawContent?:
        | undefined
        | boolean
        | "markdown"
        | "text"

    Include the cleaned and parsed HTML content of each search result. "markdown" returns search result content in markdown format. "text" returns the plain text from the results and may increase latency. If true, defaults to "markdown"

    false
    
  • OptionalmaxResults?: undefined | number

    The maximum number of search results to return.

    5
    
  • metadata: undefined | Record<string, unknown>
  • Optionalname?: undefined | string

    The name of the tool.

    "tavily_search"
    
  • responseFormat: undefined | string
  • OptionalreturnDirect?: undefined | boolean

    Whether to return the tool's output directly.

    Setting this to true means that after the tool is called, an agent should stop looping.

    false
    
  • OptionalsearchDepth?: undefined | SearchDepth

    The depth of the search. It can be "basic" or "advanced".

    "basic"
    
  • tags: undefined | string[]
  • OptionaltavilyApiKey?: undefined | string

    The API key used for authentication with the Tavily Search API.

  • OptionaltimeRange?: undefined | TimeRange

    The time range of the search. This will filter the time range of the results back from the current date. See https://docs.tavily.com/docs/rest-api/api-reference

    "general"
    
  • Optionaltopic?: undefined | TopicType

    The category of the search. This will determine which of our agents will be used for the search. Currently, only "general" and "news" are supported. See https://docs.tavily.com/docs/rest-api/api-reference

    "general"
    
  • verbose: undefined | boolean
  • verboseParsingErrors: undefined | boolean