View Source OpenAi.FineTuning (OpenAI REST API Client v1.0.0)

Provides API endpoints related to fine tuning

Summary

Functions

Link to this function

cancel_fine_tuning_job(fine_tuning_job_id, opts \\ [])

View Source
@spec cancel_fine_tuning_job(fine_tuning_job_id :: String.t(), opts :: keyword()) ::
  {:ok, OpenAi.FineTuning.Job.t()} | {:error, OpenAi.Error.error()}

Immediately cancel a fine-tune job.

Link to this function

create_fine_tuning_checkpoint_permission(fine_tuned_model_checkpoint, body, opts \\ [])

View Source
@spec create_fine_tuning_checkpoint_permission(
  fine_tuned_model_checkpoint :: String.t(),
  body :: OpenAi.FineTuning.CheckpointPermission.CreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.FineTuning.CheckpointPermission.ListResponse.t()}
  | {:error, OpenAi.Error.error()}

NOTE: Calling this endpoint requires an admin API key.

This enables organization owners to share fine-tuned models with other projects in their organization.

Link to this function

create_fine_tuning_job(body, opts \\ [])

View Source
@spec create_fine_tuning_job(
  body :: OpenAi.FineTuning.Job.CreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.FineTuning.Job.t()} | {:error, OpenAi.Error.error()}

Creates a fine-tuning job which begins the process of creating a new model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

Learn more about fine-tuning

Link to this function

delete_fine_tuning_checkpoint_permission(fine_tuned_model_checkpoint, permission_id, opts \\ [])

View Source
@spec delete_fine_tuning_checkpoint_permission(
  fine_tuned_model_checkpoint :: String.t(),
  permission_id :: String.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.FineTuning.CheckpointPermission.DeleteResponse.t()}
  | {:error, OpenAi.Error.error()}

NOTE: This endpoint requires an admin API key.

Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.

Link to this function

list_fine_tuning_checkpoint_permissions(fine_tuned_model_checkpoint, opts \\ [])

View Source
@spec list_fine_tuning_checkpoint_permissions(
  fine_tuned_model_checkpoint :: String.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.FineTuning.CheckpointPermission.ListResponse.t()}
  | {:error, OpenAi.Error.error()}

NOTE: This endpoint requires an admin API key.

Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.

Options

  • project_id: The ID of the project to get permissions for.
  • after: Identifier for the last permission ID from the previous pagination request.
  • limit: Number of permissions to retrieve.
  • order: The order in which to retrieve permissions.
Link to this function

list_fine_tuning_events(fine_tuning_job_id, opts \\ [])

View Source
@spec list_fine_tuning_events(fine_tuning_job_id :: String.t(), opts :: keyword()) ::
  {:ok, OpenAi.FineTuning.Job.Event.ListResponse.t()}
  | {:error, OpenAi.Error.error()}

Get status updates for a fine-tuning job.

Options

  • after: Identifier for the last event from the previous pagination request.
  • limit: Number of events to retrieve.
Link to this function

list_fine_tuning_job_checkpoints(fine_tuning_job_id, opts \\ [])

View Source
@spec list_fine_tuning_job_checkpoints(
  fine_tuning_job_id :: String.t(),
  opts :: keyword()
) ::
  {:ok, OpenAi.FineTuning.Job.Checkpoint.ListResponse.t()}
  | {:error, OpenAi.Error.error()}

List checkpoints for a fine-tuning job.

Options

  • after: Identifier for the last checkpoint ID from the previous pagination request.
  • limit: Number of checkpoints to retrieve.
Link to this function

list_paginated_fine_tuning_jobs(opts \\ [])

View Source
@spec list_paginated_fine_tuning_jobs(opts :: keyword()) ::
  {:ok, OpenAi.FineTuning.Job.ListResponse.t()} | {:error, OpenAi.Error.error()}

List your organization's fine-tuning jobs

Options

  • after: Identifier for the last job from the previous pagination request.
  • limit: Number of fine-tuning jobs to retrieve.
  • metadata: Optional metadata filter. To filter, use the syntax metadata[k]=v. Alternatively, set metadata=null to indicate no metadata.
Link to this function

retrieve_fine_tuning_job(fine_tuning_job_id, opts \\ [])

View Source
@spec retrieve_fine_tuning_job(fine_tuning_job_id :: String.t(), opts :: keyword()) ::
  {:ok, OpenAi.FineTuning.Job.t()} | {:error, OpenAi.Error.error()}

Get info about a fine-tuning job.

Learn more about fine-tuning