with Brave Search API and Cerebras?
Create a chat completion with Cerebras AI. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
brave_search_api: {
type: "app",
app: "brave_search_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.search.brave.com/res/v1/web/search`,
headers: {
"x-subscription-token": `${this.brave_search_api.$auth.api_key}`,
"accept": `application/json`,
"accept-encoding": `gzip`,
},
params: {
"q": `pipedream`,
},
})
},
})
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}`,
},
})
},
})