OpenAI::CreateThreadAndRunRequestModelEnum2
Inherits Enum < Comparable < Value < Object
Constants
Gpt5 = 0
Gpt5Mini = 1
Gpt5Nano = 2
Gpt520250807 = 3
Gpt5Mini20250807 = 4
Gpt5Nano20250807 = 5
Gpt41 = 6
Gpt41Mini = 7
Gpt41Nano = 8
Gpt4120250414 = 9
Gpt41Mini20250414 = 10
Gpt41Nano20250414 = 11
Gpt4O = 12
Gpt4O20241120 = 13
Gpt4O20240806 = 14
Gpt4O20240513 = 15
Gpt4OMini = 16
Gpt4OMini20240718 = 17
Gpt45Preview = 18
Gpt45Preview20250227 = 19
Gpt4Turbo = 20
Gpt4Turbo20240409 = 21
Gpt40125Preview = 22
Gpt4TurboPreview = 23
Gpt41106Preview = 24
Gpt4VisionPreview = 25
Gpt4 = 26
Gpt40314 = 27
Gpt40613 = 28
Gpt432K = 29
Gpt432K0314 = 30
Gpt432K0613 = 31
Gpt35Turbo = 32
Gpt35Turbo16K = 33
Gpt35Turbo0613 = 34
Gpt35Turbo1106 = 35
Gpt35Turbo0125 = 36
Gpt35Turbo16K0613 = 37
Constructors
new(pull : JSON::PullParser) : self
SourceInstance methods
Serializes this enum member by name.
For non-flags enums, the serialization is a JSON string. The value is the
member name (see #to_s) transformed with String#underscore.
enum Stages
INITIAL
SECOND_STAGE
end
Stages::INITIAL.to_json # => %("initial")
Stages::SECOND_STAGE.to_json # => %("second_stage")
For flags enums, the serialization is a JSON array including every flagged
member individually serialized in the same way as a member of a non-flags enum.
None is serialized as an empty array, All as an array containing
all members.
@[Flags]
enum Sides
LEFT
RIGHT
end
Sides::LEFT.to_json # => %(["left"])
(Sides::LEFT | Sides::RIGHT).to_json # => %(["left","right"])
Sides::All.to_json # => %(["left","right"])
Sides::None.to_json # => %([])
ValueConverter.to_json offers a different serialization strategy based on the
member value.