with AI/ML API and Instantly?
Emit new event when a new background job has completed. See the documentation
Emit new event when a new email is received. See the documentation
Emit new event when an activity occurs in your Instantly workspace.
Emit new event when a new lead is created. See the documentation
Adds a lead or leads to a campaign for tracking or further actions. See the documentation
Updates the interest status of a lead in a campaign. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
ai_ml_api: {
type: "app",
app: "ai_ml_api",
}
},
async run({steps, $}) {
const data = {
"model": "mistralai/Mistral-7B-v0.1",
"messages": [
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
]
}
return await axios($, {
method: "POST",
url: `https://api.aimlapi.com/chat/completions`,
headers: {
Authorization: `Bearer ${this.ai_ml_api.$auth.api_key}`,
},
data,
})
},
})
import { axios } from "@Pipedream/platform"
export default defineComponent({
props: {
instantly: {
type: "app",
app: "instantly",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.instantly.ai/api/v2/accounts`,
headers: {
Authorization: `Bearer ${this.instantly.$auth.api_key}`,
},
})
},
})