Class: OpenAI::Models::Live::DecisionItemCreateEvent::ItemUnion::FunctionCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/decision_item_create_event.rb,
sig/openai/models/live/decision_item_create_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(arguments:, call_id:, name:, id: nil, 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.

  • id (defaults to: nil) —

    The local Decision item ID.

  • namespace (defaults to: nil) —

    The namespace of the function to call.

  • type (defaults to: :function_call) —

    The item type. Always function_call.

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


# File 'lib/openai/models/live/decision_item_create_event.rb', line 114

Instance Attribute Details

#arguments ⇒ String

The function arguments as a JSON string.

Returns:

  • (String)


74
# File 'lib/openai/models/live/decision_item_create_event.rb', line 74

required :arguments, String

#call_id ⇒ String

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

Returns:

  • (String)


80
# File 'lib/openai/models/live/decision_item_create_event.rb', line 80

required :call_id, String

#id ⇒ String?

The local Decision item ID.

Returns:

  • (String, nil)


97
# File 'lib/openai/models/live/decision_item_create_event.rb', line 97

optional :id, String, nil?: true

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


85
# File 'lib/openai/models/live/decision_item_create_event.rb', line 85

required :name, String

#namespace ⇒ String?

The namespace of the function to call.

Returns:

  • (String, nil)


103
# File 'lib/openai/models/live/decision_item_create_event.rb', line 103

optional :namespace, String, nil?: true

#status ⇒ Symbol, ...

Parameters:

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

Returns:



108
109
110
111
112
# File 'lib/openai/models/live/decision_item_create_event.rb', line 108

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

#type ⇒ :function_call

The item type. Always function_call.

Returns:

  • (:function_call)


91
# File 'lib/openai/models/live/decision_item_create_event.rb', line 91

required :type, const: :function_call

Instance Method Details

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

Returns:

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


99
100
101
102
103
104
105
106
107
# File 'sig/openai/models/live/decision_item_create_event.rbs', line 99

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