Class: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall

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

Defined Under Namespace

Modules: Object, Status

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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:, name:, id: nil, call_id: nil, object: nil, status: nil, type: :function_call) ⇒ RealtimeConversationItemFunctionCall

Returns a new instance of RealtimeConversationItemFunctionCall.

Parameters:

  • arguments —

    The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example {"arg1": "value1", "arg2": 42}.

  • name —

    The name of the function being called.

  • id (defaults to: nil) —

    The unique ID of the item. This may be provided by the client or generated by the server.

  • call_id (defaults to: nil) —

    The ID of the function call.

  • object (defaults to: nil) —

    Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

  • status (defaults to: nil) —

    The status of the item. Has no effect on the conversation.

  • type (defaults to: :function_call) —

    The type of the item. Always function_call.

  • arguments: (String)
  • name: (String)
  • id: (String) (defaults to: nil)
  • call_id: (String) (defaults to: nil)
  • object: (OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object) (defaults to: nil)
  • status: (OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status) (defaults to: nil)
  • type: (:function_call) (defaults to: :function_call)


# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 53

Instance Attribute Details

#arguments ⇒ String

The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example {"arg1": "value1", "arg2": 42}.

Returns:

  • (String)


13
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 13

required :arguments, String

#call_id ⇒ String?

The ID of the function call.

Returns:

  • (String, nil)


38
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 38

optional :call_id, String

#id ⇒ String?

The unique ID of the item. This may be provided by the client or generated by the server.

Returns:

  • (String, nil)


32
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 32

optional :id, String

#name ⇒ String

The name of the function being called.

Returns:

  • (String)


19
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 19

required :name, String

#object ⇒ OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object?

Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

Returns:

  • (OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object, nil)


45
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 45

optional :object, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCall::Object }

#status ⇒ OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status?

The status of the item. Has no effect on the conversation.

Returns:

  • (OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status, nil)


51
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 51

optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCall::Status }

#type ⇒ :function_call

The type of the item. Always function_call.

Returns:

  • (:function_call)


25
# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 25

required :type, const: :function_call

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_conversation_item_function_call.rb', line 90

Instance Method Details

#to_hash ⇒ { arguments: String, name: String, ?type: :function_call, ?id: String, ?call_id: String, ?object: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object, ?status: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status }

Returns:

  • ({ arguments: String, name: String, ?type: :function_call, ?id: String, ?call_id: String, ?object: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object, ?status: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status })


87
88
89
90
91
92
93
94
95
# File 'sig/openai/models/realtime/realtime_conversation_item_function_call.rbs', line 87

def to_hash: -> {
  arguments: String,
  name: String,
  ?type: :function_call,
  ?id: String,
  ?call_id: String,
  ?object: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::object,
  ?status: OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::status
}