Skip to content

List fine-tuning events

client.FineTuning.Jobs.ListEvents(ctx, fineTuningJobID, query) (*CursorPage[FineTuningJobEvent], error)
GET/fine_tuning/jobs/{fine_tuning_job_id}/events

Get status updates for a fine-tuning job.

ParametersExpand Collapse
fineTuningJobID string
query FineTuningJobListEventsParams
After param.Field[string]optional

Identifier for the last event from the previous pagination request.

Limit param.Field[int64]optional

Number of events to retrieve.

ReturnsExpand Collapse
type FineTuningJobEvent struct{…}

Fine-tuning job event object

ID string

The object identifier.

CreatedAt int64

The Unix timestamp (in seconds) for when the fine-tuning job was created.

Level FineTuningJobEventLevel

The log level of the event.

Accepts one of the following:
const FineTuningJobEventLevelInfo FineTuningJobEventLevel = "info"
const FineTuningJobEventLevelWarn FineTuningJobEventLevel = "warn"
const FineTuningJobEventLevelError FineTuningJobEventLevel = "error"
Message string

The message of the event.

Object FineTuningJobEvent

The object type, which is always "fine_tuning.job.event".

Data anyoptional

The data associated with the event.

Type FineTuningJobEventTypeoptional

The type of event.

Accepts one of the following:
const FineTuningJobEventTypeMessage FineTuningJobEventType = "message"
const FineTuningJobEventTypeMetrics FineTuningJobEventType = "metrics"

List fine-tuning events

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.FineTuning.Jobs.ListEvents(
    context.TODO(),
    "ft-AF1WoRqd3aJAHsqc9NY7iL8F",
    openai.FineTuningJobListEventsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "level": "info",
      "message": "message",
      "object": "fine_tuning.job.event",
      "data": {},
      "type": "message"
    }
  ],
  "has_more": true,
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "level": "info",
      "message": "message",
      "object": "fine_tuning.job.event",
      "data": {},
      "type": "message"
    }
  ],
  "has_more": true,
  "object": "list"
}