Use the Perplexity Agent API to perform real-time web searches and get grounded answers.
To perform a web search:
scripts/search.py script with the query.answer from the JSON response to the user.To search for "latest AI developments":
python3 scripts/search.py "What are the latest developments in AI?"
PERPLEXITY_API_KEY to be set in the environment.pro-search preset for high-quality, researched results.success, answer, and the model used.共 1 个版本