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_with_error, 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(call_id:, success:, turn_id:, error: nil, output: nil, type: :"agent.session.input.tool_result") ⇒ Object

Submits the result of a function call.

Parameters:

  • call_id (String)

    The ID of the function call.

  • success (Boolean)

    Whether the function call succeeded.

  • turn_id (String)

    The ID of the turn that requested the function call.

  • error (String, nil) (defaults to: nil)

    The error message when the call failed.

  • output (String, Array<OpenAI::Models::Beta::InputContentParam::InputText, OpenAI::Models::Beta::InputContentParam::InputImage>, nil) (defaults to: nil)

    A function result represented as text or supported model-input content.

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

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



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

Instance Attribute Details

#call_idString

The ID of the function call.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :call_id, String

#errorString?

The error message when the call failed.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :error, String, nil?: true

#outputString, ...

A function result represented as text or supported model-input content.

Parameters:

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

Returns:



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

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

#successBoolean

Whether the function call succeeded.

Parameters:

Returns:



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

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

#turn_idString

The ID of the turn that requested the function call.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :turn_id, String

#typeSymbol, :"agent.session.input.tool_result"

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

Parameters:

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

Returns:

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


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

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

Instance Method Details

#to_hash{

Returns:

  • ({)


77
# File 'sig/openai/models/beta/agent_session_input_param.rbs', line 77

def to_hash: -> {