enum

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
Source

Instance methods

gpt35_turbo0125?

Returns true if this enum value equals Gpt35Turbo0125

Source
gpt35_turbo0613?

Returns true if this enum value equals Gpt35Turbo0613

Source
gpt35_turbo1106?

Returns true if this enum value equals Gpt35Turbo1106

Source
gpt35_turbo16_k0613?

Returns true if this enum value equals Gpt35Turbo16K0613

Source
gpt35_turbo16_k?

Returns true if this enum value equals Gpt35Turbo16K

Source
gpt35_turbo?

Returns true if this enum value equals Gpt35Turbo

Source
gpt40125_preview?

Returns true if this enum value equals Gpt40125Preview

Source
gpt40314?

Returns true if this enum value equals Gpt40314

Source
gpt40613?

Returns true if this enum value equals Gpt40613

Source
gpt41106_preview?

Returns true if this enum value equals Gpt41106Preview

Source
gpt4120250414?

Returns true if this enum value equals Gpt4120250414

Source
gpt41?

Returns true if this enum value equals Gpt41

Source
gpt41_mini20250414?

Returns true if this enum value equals Gpt41Mini20250414

Source
gpt41_mini?

Returns true if this enum value equals Gpt41Mini

Source
gpt41_nano20250414?

Returns true if this enum value equals Gpt41Nano20250414

Source
gpt41_nano?

Returns true if this enum value equals Gpt41Nano

Source
gpt432_k0314?

Returns true if this enum value equals Gpt432K0314

Source
gpt432_k0613?

Returns true if this enum value equals Gpt432K0613

Source
gpt432_k?

Returns true if this enum value equals Gpt432K

Source
gpt45_preview20250227?

Returns true if this enum value equals Gpt45Preview20250227

Source
gpt45_preview?

Returns true if this enum value equals Gpt45Preview

Source
gpt4?

Returns true if this enum value equals Gpt4

Source
gpt4_o20240513?

Returns true if this enum value equals Gpt4O20240513

Source
gpt4_o20240806?

Returns true if this enum value equals Gpt4O20240806

Source
gpt4_o20241120?

Returns true if this enum value equals Gpt4O20241120

Source
gpt4_o?

Returns true if this enum value equals Gpt4O

Source
gpt4_o_mini20240718?

Returns true if this enum value equals Gpt4OMini20240718

Source
gpt4_o_mini?

Returns true if this enum value equals Gpt4OMini

Source
gpt4_turbo20240409?

Returns true if this enum value equals Gpt4Turbo20240409

Source
gpt4_turbo?

Returns true if this enum value equals Gpt4Turbo

Source
gpt4_turbo_preview?

Returns true if this enum value equals Gpt4TurboPreview

Source
gpt4_vision_preview?

Returns true if this enum value equals Gpt4VisionPreview

Source
gpt520250807?

Returns true if this enum value equals Gpt520250807

Source
gpt5?

Returns true if this enum value equals Gpt5

Source
gpt5_mini20250807?

Returns true if this enum value equals Gpt5Mini20250807

Source
gpt5_mini?

Returns true if this enum value equals Gpt5Mini

Source
gpt5_nano20250807?

Returns true if this enum value equals Gpt5Nano20250807

Source
gpt5_nano?

Returns true if this enum value equals Gpt5Nano

Source
to_json(json : JSON::Builder) : Nil

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.

Source