with Upgrade.chat and Cerebras?
Create a chat completion with Cerebras AI. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
upgrade_chat: {
type: "app",
app: "upgrade_chat",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.upgrade.chat/v1/orders`,
headers: {
Authorization: `Bearer ${this.upgrade_chat.$auth.token}`,
"accept": `application/json`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
cerebras: {
type: "app",
app: "cerebras",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.cerebras.ai/v1/models`,
headers: {
Authorization: `Bearer ${this.cerebras.$auth.api_key}`,
},
})
},
})