@trigger.dev/openai v2.0.11

Eric Allam

Eric Allam

CTO, Trigger.dev

We've updated our OpenAI package to use the new and improved v4 of the OpenAI SDK.

All of our existing tasks should work as before, but now when you use the .native property you'll get back and nice and shiny v4 SDK:


import { OpenAI } from "@trigger.dev/openai";
const openai = new OpenAI({
id: "openai",
apiKey: process.env["OPENAI_API_KEY"]!,
});
// Before: v3 SDK
openai.native.createCompletion({...});
// Now: v4 SDK
openai.native.completions.create({...});

We've also added some new tasks for enabling fine tuning jobs:

  • createFineTuningJob - Create a fine-tuning job for a fine-tuning model
  • retrieveFineTuningJob - Retrieve a fine-tuning job for a fine-tuning model
  • listFineTuningJobs - List fine-tuning jobs for a fine-tuning model
  • cancelFineTuningJob - Cancel a fine-tuning job for a fine-tuning model
  • listFineTuningJobEvents - List fine-tuning job events for a fine-tuning model

Ready to start building?

Build and deploy your first task in 3 minutes.

Get started now