import OpenAI from 'openai';
export default defineComponent({
props: {
octagon: {
type: "app",
app: "octagon",
}
},
async run({ steps, $ }) {
const client = new OpenAI({
apiKey: this.octagon.$auth.api_key,
baseURL: "https://api-gateway.octagonagents.com/v1",
});
return await client.responses.create({
model: "octagon-agent",
input: "Retrieve year-over-year growth in key income-statement items for AAPL, limited to 5 records and filtered by period FY."
});
},
})
Octagon uses API keys for authentication. When you connect your Octagon account, Pipedream securely stores the keys so you can easily authenticate to Octagon APIs in both code and no-code steps.