Mandala
Tools

Perplexity

Use Perplexity AI for chat and search

Usage Instructions

Integrate Perplexity into the workflow. Can generate completions using Perplexity AI chat models or perform web searches with advanced filtering.

Tools

perplexity_chat

Generate completions using Perplexity AI chat models

Input

ParameterTypeRequiredDescription
systemPromptstringNoSystem prompt to guide the model behavior
contentstringYesThe user message content to send to the model
modelstringYesModel to use for chat completions (e.g., sonar, mistral)
max_tokensnumberNoMaximum number of tokens to generate
temperaturenumberNoSampling temperature between 0 and 1
apiKeystringYesPerplexity API key

Output

ParameterTypeDescription
contentstringGenerated text content
modelstringModel used for generation
usageobjectToken usage information

Get ranked search results from Perplexity's continuously refreshed index with advanced filtering and customization options

Input

ParameterTypeRequiredDescription
querystringYesA search query or array of queries (max 5 for multi-query search)
max_resultsnumberNoMaximum number of search results to return (1-20, default: 10)
search_domain_filterarrayNoList of domains/URLs to limit search results to (max 20)
max_tokens_per_pagenumberNoMaximum number of tokens retrieved from each webpage (default: 1024)
countrystringNoCountry code to filter search results (e.g., US, GB, DE)
search_recency_filterstringNoFilter results by recency: hour, day, week, month, or year
search_after_datestringNoInclude only content published after this date (format: MM/DD/YYYY)
search_before_datestringNoInclude only content published before this date (format: MM/DD/YYYY)
apiKeystringYesPerplexity API key

Output

ParameterTypeDescription
resultsarrayArray of search results

Notes

  • Category: tools
  • Type: perplexity
Perplexity