We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9346ef commit beb4d59Copy full SHA for beb4d59
lib/openai/files.rb
@@ -1,6 +1,10 @@
1
module OpenAI
2
class Files
3
- PURPOSES = %w[fine-tune assistants].freeze
+ PURPOSES = %w[
4
+ assistants
5
+ batch
6
+ fine-tune
7
+ ].freeze
8
9
def initialize(client:)
10
@client = client
@@ -51,7 +55,7 @@ def prepare_file_input(file_input:)
51
55
def validate(file:, purpose:, file_input:)
52
56
raise ArgumentError, "`file` is required" if file.nil?
53
57
unless PURPOSES.include?(purpose)
54
- raise ArgumentError, "`purpose` must one of `#{PURPOSES.join(',')}`"
58
+ raise ArgumentError, "`purpose` must be one of `#{PURPOSES.join(',')}`"
59
end
60
61
validate_jsonl(file: file) if file_input.is_a?(String) && file_input.end_with?(".jsonl")
0 commit comments