An AI powered experience that allows you to chat with your favorite characters from movies, TV shows, books, history, and more.
Generates a message reply using a ChatFAI character. See the documentation
Create a new document in a collection of your choice. See the docs here
Gets a public character by ID from ChatFAI. See the documentation
Search for public characters on ChatFAI. See the documentation
The ChatFAI API enables the creation of chatbots with capabilities ranging from answering FAQs to providing recommendations and conducting conversations. Leveraging this API within Pipedream allows for the automation of these conversational features across various platforms and services. With Pipedream's serverless approach, you can integrate the ChatFAI API to trigger actions, respond to events, and connect with numerous apps to enhance user engagement and streamline communication processes.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
chatfai: {
type: "app",
app: "chatfai",
}
},
async run({steps, $}) {
return await axios($, {
url: ` https://api.chatfai.com/v1/characters/search`,
headers: {
Authorization: `Bearer ${this.chatfai.$auth.api_key}`,
},
params: {
"q": `Bertram Gilfoyle`,
},
})
},
})
The MongoDB API provides powerful capabilities to interact with a MongoDB database, allowing you to perform CRUD (Create, Read, Update, Delete) operations, manage databases, and execute sophisticated queries. With Pipedream, you can harness these abilities to automate tasks, sync data across various apps, and react to events in real-time. It’s a combo that’s particularly potent for managing data workflows, syncing application states, or triggering actions based on changes to your data.
import mongodb from 'mongodb'
export default defineComponent({
props: {
mongodb: {
type: "app",
app: "mongodb",
},
collection: {
type: "string"
},
filter: {
type: "object"
}
},
async run({steps, $}) {
const MongoClient = mongodb.MongoClient
const {
database,
hostname,
username,
password,
} = this.mongodb.$auth
const url = `mongodb+srv://${username}:${password}@${hostname}/test?retryWrites=true&w=majority`
const client = await MongoClient.connect(url, {
useNewUrlParser: true,
useUnifiedTopology: true
})
const db = client.db(database)
const results = await db.collection(this.collection).find(this.filter).toArray();
$.export('results', results);
await client.close()
},
})