All URIs are relative to https://api.openai.com/v1
Method | HTTP request | Description |
---|---|---|
cancel_fine_tuning_job | POST /fine_tuning/jobs/{fine_tuning_job_id}/cancel | Immediately cancel a fine-tune job. |
create_fine_tuning_job | POST /fine_tuning/jobs | Creates a job that fine-tunes a specified 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 |
list_fine_tuning_events | GET /fine_tuning/jobs/{fine_tuning_job_id}/events | Get status updates for a fine-tuning job. |
list_paginated_fine_tuning_jobs | GET /fine_tuning/jobs | List your organization's fine-tuning jobs |
retrieve_fine_tuning_job | GET /fine_tuning/jobs/{fine_tuning_job_id} | Get info about a fine-tuning job. Learn more about fine-tuning |
cancel_fine_tuning_job(fine_tuning_job_id)
Immediately cancel a fine-tune job.
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: ApiKeyAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = OpenapiClient::FineTuningApi.new
fine_tuning_job_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tuning job to cancel.
begin
# Immediately cancel a fine-tune job.
result = api_instance.cancel_fine_tuning_job(fine_tuning_job_id)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->cancel_fine_tuning_job: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> cancel_fine_tuning_job_with_http_info(fine_tuning_job_id)
begin
# Immediately cancel a fine-tune job.
data, status_code, headers = api_instance.cancel_fine_tuning_job_with_http_info(fine_tuning_job_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <FineTuningJob>
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->cancel_fine_tuning_job_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
fine_tuning_job_id | String | The ID of the fine-tuning job to cancel. |
- Content-Type: Not defined
- Accept: application/json
create_fine_tuning_job(create_fine_tuning_job_request)
Creates a job that fine-tunes a specified 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
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: ApiKeyAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = OpenapiClient::FineTuningApi.new
create_fine_tuning_job_request = OpenapiClient::CreateFineTuningJobRequest.new({model: OpenapiClient::CreateFineTuningJobRequestModel.new, training_file: 'file-abc123'}) # CreateFineTuningJobRequest |
begin
# Creates a job that fine-tunes a specified 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](/docs/guides/fine-tuning)
result = api_instance.create_fine_tuning_job(create_fine_tuning_job_request)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->create_fine_tuning_job: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_fine_tuning_job_with_http_info(create_fine_tuning_job_request)
begin
# Creates a job that fine-tunes a specified 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](/docs/guides/fine-tuning)
data, status_code, headers = api_instance.create_fine_tuning_job_with_http_info(create_fine_tuning_job_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <FineTuningJob>
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->create_fine_tuning_job_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_fine_tuning_job_request | CreateFineTuningJobRequest |
- Content-Type: application/json
- Accept: application/json
list_fine_tuning_events(fine_tuning_job_id, opts)
Get status updates for a fine-tuning job.
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: ApiKeyAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = OpenapiClient::FineTuningApi.new
fine_tuning_job_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tuning job to get events for.
opts = {
after: 'after_example', # String | Identifier for the last event from the previous pagination request.
limit: 56 # Integer | Number of events to retrieve.
}
begin
# Get status updates for a fine-tuning job.
result = api_instance.list_fine_tuning_events(fine_tuning_job_id, opts)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->list_fine_tuning_events: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_fine_tuning_events_with_http_info(fine_tuning_job_id, opts)
begin
# Get status updates for a fine-tuning job.
data, status_code, headers = api_instance.list_fine_tuning_events_with_http_info(fine_tuning_job_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListFineTuningJobEventsResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->list_fine_tuning_events_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
fine_tuning_job_id | String | The ID of the fine-tuning job to get events for. | |
after | String | Identifier for the last event from the previous pagination request. | [optional] |
limit | Integer | Number of events to retrieve. | [optional][default to 20] |
ListFineTuningJobEventsResponse
- Content-Type: Not defined
- Accept: application/json
list_paginated_fine_tuning_jobs(opts)
List your organization's fine-tuning jobs
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: ApiKeyAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = OpenapiClient::FineTuningApi.new
opts = {
after: 'after_example', # String | Identifier for the last job from the previous pagination request.
limit: 56 # Integer | Number of fine-tuning jobs to retrieve.
}
begin
# List your organization's fine-tuning jobs
result = api_instance.list_paginated_fine_tuning_jobs(opts)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->list_paginated_fine_tuning_jobs: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_paginated_fine_tuning_jobs_with_http_info(opts)
begin
# List your organization's fine-tuning jobs
data, status_code, headers = api_instance.list_paginated_fine_tuning_jobs_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListPaginatedFineTuningJobsResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->list_paginated_fine_tuning_jobs_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
after | String | Identifier for the last job from the previous pagination request. | [optional] |
limit | Integer | Number of fine-tuning jobs to retrieve. | [optional][default to 20] |
ListPaginatedFineTuningJobsResponse
- Content-Type: Not defined
- Accept: application/json
retrieve_fine_tuning_job(fine_tuning_job_id)
Get info about a fine-tuning job. Learn more about fine-tuning
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure Bearer authorization: ApiKeyAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = OpenapiClient::FineTuningApi.new
fine_tuning_job_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tuning job.
begin
# Get info about a fine-tuning job. [Learn more about fine-tuning](/docs/guides/fine-tuning)
result = api_instance.retrieve_fine_tuning_job(fine_tuning_job_id)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->retrieve_fine_tuning_job: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> retrieve_fine_tuning_job_with_http_info(fine_tuning_job_id)
begin
# Get info about a fine-tuning job. [Learn more about fine-tuning](/docs/guides/fine-tuning)
data, status_code, headers = api_instance.retrieve_fine_tuning_job_with_http_info(fine_tuning_job_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <FineTuningJob>
rescue OpenapiClient::ApiError => e
puts "Error when calling FineTuningApi->retrieve_fine_tuning_job_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
fine_tuning_job_id | String | The ID of the fine-tuning job. |
- Content-Type: Not defined
- Accept: application/json