with BotX and Hugging Face?
Want to have a nice know-it-all bot that can answer any question?. This action allows you to ask a question and get an answer from a trained model. See the docs
This task reads some image input and outputs the likelihood of classes. This action allows you to classify images into categories. See the docs
This task is well known to translate text from one language to another. See the docs
This task reads some image input and outputs the likelihood of classes and bounding boxes of detected objects. See the docs
Usually used for sentiment-analysis this will output the likelihood of classes of an input. This action allows you to classify text into categories. See the docs
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
botx: {
type: "app",
app: "botx",
}
},
async run({steps, $}) {
const data = {
"Action": "Execute",
"UserSays": "[{\"DCSField\":\"Could you be my assistant today?\"}]"
}
return await axios($, {
method: "post",
url: `https://api.botx.cloud/CognitiveDiagram/${this.botx.$auth.cognitive_diagram_id}/Execute`,
headers: {
Authorization: `Bearer ${this.botx.$auth.oauth_access_token}`,
"Content-Type": "application/json"
},
data,
})
},
})
The Hugging Face API provides access to a vast range of machine learning models, primarily for natural language processing (NLP) tasks like text classification, translation, summarization, and question answering. It lets you leverage pre-trained models and fine-tune them on your data. Using the API within Pipedream, you can automate workflows that involve language processing, integrate AI insights into your apps, or respond to events with AI-generated content.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
hugging_face: {
type: "app",
app: "hugging_face",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://huggingface.co/api/whoami-v2`,
headers: {
Authorization: `Bearer ${this.hugging_face.$auth.access_token}`,
},
})
},
})