Class: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall

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

Defined Under Namespace

Modules: Status

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(id:, arguments:, call_id:, name:, namespace: nil, status: nil, type: :function_call) ⇒ FunctionCall

Returns a new instance of FunctionCall.

Parameters:

  • arguments —

    The function arguments as a JSON string.

  • call_id —

    The unique ID of the function tool call generated by the model.

  • namespace (defaults to: nil) —

    The namespace of the function to call.

  • type (defaults to: :function_call) —

    The item type. Always function_call.

  • id: (String)
  • arguments: (String)
  • call_id: (String)
  • name: (String)
  • namespace: (String, nil) (defaults to: nil)
  • status: (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::status, nil) (defaults to: nil)
  • type: (:function_call) (defaults to: :function_call)


# File 'lib/openai/models/live/decision_item_created_event.rb', line 121

Instance Attribute Details

#arguments ⇒ String

The function arguments as a JSON string.

Returns:

  • (String)


87
# File 'lib/openai/models/live/decision_item_created_event.rb', line 87

required :arguments, String

#call_id ⇒ String

The unique ID of the function tool call generated by the model.

Returns:

  • (String)


93
# File 'lib/openai/models/live/decision_item_created_event.rb', line 93

required :call_id, String

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


81
# File 'lib/openai/models/live/decision_item_created_event.rb', line 81

required :id, String

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


98
# File 'lib/openai/models/live/decision_item_created_event.rb', line 98

required :name, String

#namespace ⇒ String?

The namespace of the function to call.

Returns:

  • (String, nil)


110
# File 'lib/openai/models/live/decision_item_created_event.rb', line 110

optional :namespace, String, nil?: true

#status ⇒ Symbol, ...

Parameters:

  • value (OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::status, nil)

Returns:



115
116
117
118
119
# File 'lib/openai/models/live/decision_item_created_event.rb', line 115

optional(
  :status,
  enum: -> { OpenAI::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::Status },
  nil?: true
)

#type ⇒ :function_call

The item type. Always function_call.

Returns:

  • (:function_call)


104
# File 'lib/openai/models/live/decision_item_created_event.rb', line 104

required :type, const: :function_call

Instance Method Details

#to_hash ⇒ { id: String, arguments: String, call_id: String, name: String, ?type: :function_call, ?namespace: String?, ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::status? }

Returns:

  • ({ id: String, arguments: String, call_id: String, name: String, ?type: :function_call, ?namespace: String?, ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::status? })


108
109
110
111
112
113
114
115
116
# File 'sig/openai/models/live/decision_item_created_event.rbs', line 108

def to_hash: -> {
  id: String,
  arguments: String,
  call_id: String,
  name: String,
  ?type: :function_call,
  ?namespace: String?,
  ?status: OpenAI::Models::Live::DecisionItemCreatedEvent::ItemUnion::FunctionCall::status?
}