with Uspacy and Groq Cloud?
Creates a model response for the given chat conversation. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
uspacy: {
type: "app",
app: "uspacy",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.uspacy.$auth.domain}/company/v1/users/me`,
headers: {
Authorization: `Bearer ${this.uspacy.$auth.oauth_access_token}`,
},
})
},
})
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,
})
},
})