enum

OpenAI::IncludeEnum

Inherits Enum < Comparable < Value < Object

Specify additional output data to include in the model response. Currently supported values are:

  • web_search_call.action.sources: Include the sources of the web search tool call.
  • code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.
  • computer_call_output.output.image_url: Include image urls from the computer call output.
  • file_search_call.results: Include the search results of the file search tool call.
  • message.input_image.image_url: Include image urls from the input message.
  • message.output_text.logprobs: Include logprobs with assistant messages.
  • reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).

Constants

FileSearchCallResults = 0
WebSearchCallResults = 1
WebSearchCallActionSources = 2
MessageInputImageImageUrl = 3
ComputerCallOutputOutputImageUrl = 4
CodeInterpreterCallOutputs = 5
ReasoningEncryptedContent = 6
MessageOutputTextLogprobs = 7

Constructors

new(pull : JSON::PullParser) : self
Source

Instance methods

code_interpreter_call_outputs?

Returns true if this enum value equals CodeInterpreterCallOutputs

Source
computer_call_output_output_image_url?

Returns true if this enum value equals ComputerCallOutputOutputImageUrl

Source
file_search_call_results?

Returns true if this enum value equals FileSearchCallResults

Source
message_input_image_image_url?

Returns true if this enum value equals MessageInputImageImageUrl

Source
message_output_text_logprobs?

Returns true if this enum value equals MessageOutputTextLogprobs

Source
reasoning_encrypted_content?

Returns true if this enum value equals ReasoningEncryptedContent

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
web_search_call_action_sources?

Returns true if this enum value equals WebSearchCallActionSources

Source
web_search_call_results?

Returns true if this enum value equals WebSearchCallResults

Source