The Perplexity API offers advanced natural language processing capabilities, enabling users to generate answers, summaries, and insights from texts. Leveraging this API on Pipedream allows for the automation of content analysis, intelligent alert systems, and dynamic data enrichment, integrating seamlessly with various data sources and services for real-time processing.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
perplexity: {
type: "app",
app: "perplexity",
}
},
async run({steps, $}) {
const data = {
"model": "mistral-7b-instruct",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
},
{
"role": "user",
"content": "Can you tell me about the integration platform called Pipedream?"
}
]
}
return await axios($, {
method: "post",
url: `https://api.perplexity.ai/chat/completions`,
headers: {
Authorization: `Bearer ${this.perplexity.$auth.api_key}`,
"accept": `application/json`,
},
data,
})
},
})
Customer Support Automation: Automatically handle incoming customer queries by setting up a workflow where support emails trigger the Perplexity API to analyze and generate responses. Connect this with a customer relationship management (CRM) app on Pipedream to log interactions and follow-ups.
Content Summarization for News Articles: Streamline the process of summarizing news articles by creating a workflow where new articles fetched from RSS feeds are passed to the Perplexity API for summarization. The summaries can then be automatically posted to a company’s internal communication tool like Slack.
Real-time Social Media Monitoring: Develop a workflow to monitor social media for brand mentions. Use the Perplexity API to assess sentiment and extract key phrases from posts. This data can be piped into a data visualization tool on Pipedream, like Google Sheets, for analysis and reporting.
Generates a model's response for the given chat conversation. See the documentation
Perplexity uses API keys for authentication. When you connect your Perplexity account, Pipedream securely stores the keys so you can easily authenticate to Perplexity APIs in both code and no-code steps.