
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@ai-sdk/perplexity
Advanced tools
The **[Perplexity provider](https://ai-sdk.dev/providers/ai-sdk-providers/perplexity)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for Perplexity's Sonar API - a powerful answer engine with real-time web search capabilities.
The Perplexity provider for the AI SDK contains language model support for Perplexity's Sonar API - a powerful answer engine with real-time web search capabilities.
The Perplexity provider is available in the @ai-sdk/perplexity
module. You can install it with:
npm i @ai-sdk/perplexity
You can import the default provider instance perplexity
from @ai-sdk/perplexity
:
import { perplexity } from '@ai-sdk/perplexity';
import { perplexity } from '@ai-sdk/perplexity';
import { generateText } from 'ai';
const { text } = await generateText({
model: perplexity('sonar-pro'),
prompt: 'What are the latest developments in quantum computing?',
});
Please check out the Perplexity provider documentation for more information.
FAQs
The **[Perplexity provider](https://ai-sdk.dev/providers/ai-sdk-providers/perplexity)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for Perplexity's Sonar API - a powerful answer engine with real-time web search capabilities.
The npm package @ai-sdk/perplexity receives a total of 74,050 weekly downloads. As such, @ai-sdk/perplexity popularity was classified as popular.
We found that @ai-sdk/perplexity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.