with Imagior and Groq Cloud?
Generates a unique and robust image using a provided template. See the documentation
Creates a model response for the given chat conversation. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
imagior: {
type: "app",
app: "imagior",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.imagior.com/user/account`,
headers: {
Authorization: `Bearer ${this.imagior.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
groqcloud: {
type: "app",
app: "groqcloud",
}
},
async run({steps, $}) {
const data = {"messages": [{"role": "user", "content": "What is Pipedream?"}], "model": "llama3-8b-8192"}
return await axios($, {
method: "post",
url: `https://api.groq.com/openai/v1/chat/completions`,
headers: {
Authorization: `Bearer ${this.groqcloud.$auth.api_key}`,
},
data,
})
},
})