Class: OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agent_session_item.rb,
sig/openai/models/beta/agent_session_item.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 ⇒ FunctionCallOutput

Returns a new instance of FunctionCallOutput.

Parameters:

  • id —

    The ID of the function call output item.

  • call_id —

    The ID of the function call that produced this output.

  • error —

    The error message, if the call failed.

  • output —

    The function result, if the call succeeded.

  • status —

    The status of the function call.

  • turn_id —

    The ID of the turn that contains this item.

  • type —

    The item type. Always function_call_output.

  • id: (String)
  • call_id: (String)
  • error: (String, nil)
  • output: (OpenAI::Models::Beta::agent_function_call_output, nil)
  • status: (OpenAI::Models::Beta::agent_function_call_status)
  • turn_id: (String)
  • type: (:function_call_output)


73
74
75
76
77
78
79
80
81
# File 'sig/openai/models/beta/agent_session_item.rbs', line 73

def initialize: (
  id: String,
  call_id: String,
  error: String?,
  output: OpenAI::Models::Beta::agent_function_call_output?,
  status: OpenAI::Models::Beta::agent_function_call_status,
  turn_id: String,
  ?type: :function_call_output
) -> void

Instance Attribute Details

#call_id ⇒ String

The ID of the function call that produced this output.

Returns:

  • (String)


77
# File 'lib/openai/models/beta/agent_session_item.rb', line 77

required :call_id, String

#error ⇒ String?

The error message, if the call failed.

Returns:

  • (String, nil)


83
# File 'lib/openai/models/beta/agent_session_item.rb', line 83

required :error, String, nil?: true

#id ⇒ String

The ID of the function call output item.

Returns:

  • (String)


71
# File 'lib/openai/models/beta/agent_session_item.rb', line 71

required :id, String

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

The function result, if the call succeeded.

Returns:

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


89
# File 'lib/openai/models/beta/agent_session_item.rb', line 89

required :output, union: -> { OpenAI::Beta::AgentFunctionCallOutput }, nil?: true

#status ⇒ OpenAI::Models::Beta::agent_function_call_status

The status of the function call.

Returns:

  • (OpenAI::Models::Beta::agent_function_call_status)


95
# File 'lib/openai/models/beta/agent_session_item.rb', line 95

required :status, enum: -> { OpenAI::Beta::AgentFunctionCallStatus }

#turn_id ⇒ String

The ID of the turn that contains this item.

Returns:

  • (String)


101
# File 'lib/openai/models/beta/agent_session_item.rb', line 101

required :turn_id, String

#type ⇒ :function_call_output

The item type. Always function_call_output.

Returns:

  • (:function_call_output)


107
# File 'lib/openai/models/beta/agent_session_item.rb', line 107

required :type, const: :function_call_output

Instance Method Details

#to_hash ⇒ { id: String, call_id: String, error: String?, output: OpenAI::Models::Beta::agent_function_call_output?, status: OpenAI::Models::Beta::agent_function_call_status, turn_id: String, ?type: :function_call_output }

Returns:

  • ({ id: String, call_id: String, error: String?, output: OpenAI::Models::Beta::agent_function_call_output?, status: OpenAI::Models::Beta::agent_function_call_status, turn_id: String, ?type: :function_call_output })


83
84
85
86
87
88
89
90
91
# File 'sig/openai/models/beta/agent_session_item.rbs', line 83

def to_hash: -> {
  id: String,
  call_id: String,
  error: String?,
  output: OpenAI::Models::Beta::agent_function_call_output?,
  status: OpenAI::Models::Beta::agent_function_call_status,
  turn_id: String,
  ?type: :function_call_output
}