I think you might be right, it feels like a bug in that action. If I POST your same payload in a nodejs step (or via curl) it works fine. For example:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
openai: {
type: "app",
app: "openai",
}
},
async run({steps, $}) {
const body =
{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are a helpful customer support assistant integrated into Zendesk. Provide internal notes to help agents respond to tickets effectively."
},
{
"role": "user",
"content": `Here is a new ticket that needs analysis and a suggested response:\n\nTicket Title: ${steps.trigger.event.title}\nTicket Description: ${steps.trigger.event.description}\nRequester: ${steps.trigger.event.requester}\nStatus: ${steps.trigger.event.status}\nTicket URL: ${steps.trigger.event.url}\n\nBased on this information, suggest a concise and actionable internal note for the agent. If additional resources (knowledge base articles or macros) should be created, include that suggestion.`
}
],
"temperature": 0.7,
"max_tokens": 200
}
return await axios($, {
url: `https://api.openai.com/v1/chat/completions`,
headers: {
Authorization: `Bearer ${this.openai.$auth.api_key}`,
},
method: 'post',
data: body
})
},
})