Skip to main content

PerplexitySearchTool

Tool for interacting with the Perplexity AI search API.
This tool uses the Perplexity API to perform web search, news search, and conversational search, returning concise and precise responses.
Attributes:
url (str): API endpoint URL.
model (str): Name of the model to be used.
api_key (str): API key for authenticating with the Perplexity API.
max_tokens (int): Maximum tokens allowed for the API response.
search_domain_filters (Optional[list[str]]): Optional list of domain filters for the search.
Initializes a new instance of the PerplexitySearchTool.
Parameters:

Instance Methods

Perform a search query using the Perplexity AI API.
Constructs the payload, executes the query, and parses the response to return a concise search result along with any provided citations.
Parameters: Returns: