Changelog #6

·

@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:


_12
import { OpenAI } from "@trigger.dev/openai";
_12
_12
const openai = new OpenAI({
_12
id: "openai",
_12
apiKey: process.env["OPENAI_API_KEY"]!,
_12
});
_12
_12
// Before: v3 SDK
_12
openai.native.createCompletion({...});
_12
_12
// Now: v4 SDK
_12
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
,