Class: OpenAI::Finetunes

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/finetunes.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Finetunes

Returns a new instance of Finetunes.



3
4
5
# File 'lib/openai/finetunes.rb', line 3

def initialize(client:)
  @client = client
end

Instance Method Details

#cancel(id:) ⇒ Object



19
20
21
# File 'lib/openai/finetunes.rb', line 19

def cancel(id:)
  @client.json_post(path: "/fine_tuning/jobs/#{id}/cancel", parameters: {})
end

#create(parameters: {}) ⇒ Object



11
12
13
# File 'lib/openai/finetunes.rb', line 11

def create(parameters: {})
  @client.json_post(path: "/fine_tuning/jobs", parameters: parameters)
end

#listObject



7
8
9
# File 'lib/openai/finetunes.rb', line 7

def list
  @client.get(path: "/fine_tuning/jobs")
end

#list_events(id:) ⇒ Object



23
24
25
# File 'lib/openai/finetunes.rb', line 23

def list_events(id:)
  @client.get(path: "/fine_tuning/jobs/#{id}/events")
end

#retrieve(id:) ⇒ Object



15
16
17
# File 'lib/openai/finetunes.rb', line 15

def retrieve(id:)
  @client.get(path: "/fine_tuning/jobs/#{id}")
end