Class: OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_function_shell_tool_call_output.rb

Defined Under Namespace

Modules: Outcome

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(outcome:, stderr:, stdout:, created_by: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output for more details.

The content of a shell tool call output that was emitted.

Parameters:

  • Represents either an exit outcome (with an exit code) or a timeout outcome for a

  • The standard error output that was captured.

  • The standard output that was captured.

  • (defaults to: nil)

    The identifier of the actor that created the item.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 74

class Output < OpenAI::Internal::Type::BaseModel
  # @!attribute outcome
  #   Represents either an exit outcome (with an exit code) or a timeout outcome for a
  #   shell call output chunk.
  #
  #   @return [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit]
  required :outcome, union: -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome }

  # @!attribute stderr
  #   The standard error output that was captured.
  #
  #   @return [String]
  required :stderr, String

  # @!attribute stdout
  #   The standard output that was captured.
  #
  #   @return [String]
  required :stdout, String

  # @!attribute created_by
  #   The identifier of the actor that created the item.
  #
  #   @return [String, nil]
  optional :created_by, String

  # @!method initialize(outcome:, stderr:, stdout:, created_by: nil)
  #   Some parameter documentations has been truncated, see
  #   {OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output} for
  #   more details.
  #
  #   The content of a shell tool call output that was emitted.
  #
  #   @param outcome [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit] Represents either an exit outcome (with an exit code) or a timeout outcome for a
  #
  #   @param stderr [String] The standard error output that was captured.
  #
  #   @param stdout [String] The standard output that was captured.
  #
  #   @param created_by [String] The identifier of the actor that created the item.

  # Represents either an exit outcome (with an exit code) or a timeout outcome for a
  # shell call output chunk.
  #
  # @see OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output#outcome
  module Outcome
    extend OpenAI::Internal::Type::Union

    discriminator :type

    # Indicates that the shell call exceeded its configured time limit.
    variant :timeout, -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout }

    # Indicates that the shell commands finished and returned an exit code.
    variant :exit, -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit }

    class Timeout < OpenAI::Internal::Type::BaseModel
      # @!attribute type
      #   The outcome type. Always `timeout`.
      #
      #   @return [Symbol, :timeout]
      required :type, const: :timeout

      # @!method initialize(type: :timeout)
      #   Indicates that the shell call exceeded its configured time limit.
      #
      #   @param type [Symbol, :timeout] The outcome type. Always `timeout`.
    end

    class Exit < OpenAI::Internal::Type::BaseModel
      # @!attribute exit_code
      #   Exit code from the shell process.
      #
      #   @return [Integer]
      required :exit_code, Integer

      # @!attribute type
      #   The outcome type. Always `exit`.
      #
      #   @return [Symbol, :exit]
      required :type, const: :exit

      # @!method initialize(exit_code:, type: :exit)
      #   Indicates that the shell commands finished and returned an exit code.
      #
      #   @param exit_code [Integer] Exit code from the shell process.
      #
      #   @param type [Symbol, :exit] The outcome type. Always `exit`.
    end

    # @!method self.variants
    #   @return [Array(OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit)]
  end
end

Instance Attribute Details

#created_byString?

The identifier of the actor that created the item.

Returns:



98
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 98

optional :created_by, String

#outcomeOpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit

Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

Returns:



80
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 80

required :outcome, union: -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome }

#stderrString

The standard error output that was captured.

Returns:



86
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 86

required :stderr, String

#stdoutString

The standard output that was captured.

Returns:



92
# File 'lib/openai/models/responses/response_function_shell_tool_call_output.rb', line 92

required :stdout, String