Class: OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agent_session_input_param.rb,
sig/openai/models/beta/agent_session_input_param.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(call_id:, success:, turn_id:, error: nil, output: nil, type: :"agent.session.input.tool_result") ⇒ AgentSessionInputToolResult

Returns a new instance of AgentSessionInputToolResult.

Parameters:

  • call_id —

    The ID of the function call.

  • success —

    Whether the function call succeeded.

  • turn_id —

    The ID of the turn that requested the function call.

  • error (defaults to: nil) —

    The error message when the call failed.

  • output (defaults to: nil) —

    The function result when the call succeeded.

  • type (defaults to: :"agent.session.input.tool_result") —

    The type of the object. Always agent.session.input.tool_result.

  • call_id: (String)
  • success: (Boolean)
  • turn_id: (String)
  • error: (String, nil) (defaults to: nil)
  • output: (OpenAI::Models::Beta::agent_function_call_output_param, nil) (defaults to: nil)
  • type: (:"agent.session.input.tool_result") (defaults to: :"agent.session.input.tool_result")


# File 'lib/openai/models/beta/agent_session_input_param.rb', line 253

Instance Attribute Details

#call_id ⇒ String

The ID of the function call.

Returns:

  • (String)


221
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 221

required :call_id, String

#error ⇒ String?

The error message when the call failed.

Returns:

  • (String, nil)


245
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 245

optional :error, String, nil?: true

#output ⇒ OpenAI::Models::Beta::agent_function_call_output_param?

The function result when the call succeeded.

Returns:

  • (OpenAI::Models::Beta::agent_function_call_output_param, nil)


251
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 251

optional :output, union: -> { OpenAI::Beta::AgentFunctionCallOutputParam }, nil?: true

#success ⇒ Boolean

Whether the function call succeeded.

Returns:



227
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 227

required :success, OpenAI::Internal::Type::Boolean

#turn_id ⇒ String

The ID of the turn that requested the function call.

Returns:

  • (String)


233
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 233

required :turn_id, String

#type ⇒ :"agent.session.input.tool_result"

The type of the object. Always agent.session.input.tool_result.

Returns:

  • (:"agent.session.input.tool_result")


239
# File 'lib/openai/models/beta/agent_session_input_param.rb', line 239

required :type, const: :"agent.session.input.tool_result"

Instance Method Details

#to_hash ⇒ { call_id: String, success: bool, turn_id: String, ?type: :"agent.session.input.tool_result", ?error: String?, ?output: OpenAI::Models::Beta::agent_function_call_output_param? }

Returns:

  • ({ call_id: String, success: bool, turn_id: String, ?type: :"agent.session.input.tool_result", ?error: String?, ?output: OpenAI::Models::Beta::agent_function_call_output_param? })


233
234
235
236
237
238
239
240
# File 'sig/openai/models/beta/agent_session_input_param.rbs', line 233

def to_hash: -> {
  call_id: String,
  success: bool,
  turn_id: String,
  ?type: :"agent.session.input.tool_result",
  ?error: String?,
  ?output: OpenAI::Models::Beta::agent_function_call_output_param?
}