with Trunkrs and Groq Cloud?
Emit new event when a new shipment is created. See the documentation
Emit new event when a shipment is cancelled. See the documentation
Emit new event when a shipment is reviewed. See the documentation
Emit new event when a shipment state is updated. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
trunkrs: {
type: "app",
app: "trunkrs",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.trunkrs.$auth.environment}/api/v2/shipments`,
headers: {
"x-api-key": `${this.trunkrs.$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,
})
},
})